function Calendar() {
    this._init.apply(this, arguments)
}

function dateFormat(n) {
    var t = n.split(" "), i = t[0].split("-"), r = t.length > 1 ? t[1].split(":") : [0, 0, 0];
    return new Date(i[0], i[1] - 1, i[2], r[0], r[1], r[2])
}

function dateDiff(n, t) {
    var e = 864e5, o = 36e5, u = new Date(Date.parse(n.replace(/-/g, "/"))),
        f = new Date(Date.parse(t.replace(/-/g, "/"))), s = (f.getTime() - u.getTime()) / e, r, h, i;
    return s >= 0 ? (r = Math.floor((f.getTime() - u.getTime()) / e), h = s - r, h === 0) ? r + "天" : (i = (f.getTime() - u.getTime()) / o, i = i - r * 24, r + "天" + Math.ceil(i) + "小时") : (i = (f.getTime() - u.getTime()) / o, Math.ceil(i) + "小时")
}

function myshowBox(n, t, i, r, u, f) {
    var h = n, a = t, e = i, c = r, v = u, y = f, p = function () {
        var n = 0, t = 0;
        return window.innerWidth ? n = window.innerWidth : document.body && document.body.clientWidth && (n = document.body.clientWidth), window.innerHeight ? t = window.innerHeight : document.body && document.body.clientHeight && (t = document.body.clientHeight), document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth && (t = document.documentElement.clientHeight, n = document.documentElement.clientWidth), n + "-" + t
    }, o, l, s;
    v == "iframe" ? (o = "<iframe class='iframe-myshowbox' id='myshowbox' src='" + a + "' frameborder='0' scrolling='no' width='" + e + "' height='" + c + "'><\/iframe>", l = navigator.userAgent, l.indexOf("MSIE 6.0") > -1 && setTimeout("window.parent['myshowbox'].location.reload();", 0)) : o = "<div class='div-myshowbox' style='width:" + e + "px; height:" + c + "px;'><\/div>";
    $("body").append("<div id='mshowbox' class='myshowbox " + y + "'><div class='myshowbox-container'><a class='btn-close' href='javascript:;'><\/a><h3 class='title'>" + h + "<\/h3>" + o + "<\/div><\/div><div id='bgScreen'><\/div><iframe id='bgIFrame' src='about:blank'><\/iframe>");
    h == "" ? $(".myshowbox .title").hide() : $(".myshowbox .title").css("width", e - 20 + "px");
    s = function () {
        if (jQuery.browser.version == "6.0") {
            var n = p().split("-");
            $(".myshowbox").css({
                top: (n[1] - $(".myshowbox").height()) / 2 + document.documentElement.scrollTop + "px",
                left: n[0] / 2 + document.documentElement.scrollLeft
            })
        }
    };
    $(".myshowbox-container").css("width", e);
    $(".myshowbox").css("margin", (jQuery.browser.version == "6.0" ? 0 : -$(".myshowbox").height() / 2 - 5) + "px 0 0 " + -$(".myshowbox").width() / 2 + "px");
    $("#bgScreen, #bgIFrame").css("height", jQuery.browser.version == "6.0" ? window.screen.height - 160 : "100%");
    jQuery.browser.version == "6.0" && (s(), $(window).bind("scroll", function () {
        s()
    }), $(".myshowbox").css("left", document.documentElement.scrollLeft + document.documentElement.clientWidth - this.offsetWidth));
    $(".myshowbox-container .btn-close, #bgScreen").click("click", function () {
        $(".myshowbox, #bgScreen, #bgIFrame").hide().remove();
        $(window).unbind("scroll")
    })
}

function initServiceMap(n, t, i, r) {
    var u = BookingInfo.Type === "get" ? "https://www.1hai.cn/Content/Index/Images/car-send.png" : "https://www.1hai.cn/Content/Index/Images/car-take.png";
    MapCommon.Parameter.MapDivId = "container";
    MapCommon.Parameter.MapZoomLevel = r;
    MapCommon.Parameter.MarkerIcon = u;
    MapCommon.Parameter.initialLat = n;
    MapCommon.Parameter.initialLng = t;
    MapCommon.Parameter.MapPolygonData = i;
    MapCommon.Parameter.OutFun = function (n, t) {
        mapPositionAddress(n, t, "")
    };
    MapCommon.Parameter.InFun = function (n, t) {
        var i = BookingInfo.Type === "get" ? $(BookTarget.PickupCityId).val() : $(BookTarget.ReturnCityId).val();
        mapPositionAddress(n, t, i)
    };
    MapCommon.func.MapLoad()
}

function initIndexMap(n) {
    MapCommon.Parameter.MapDivId = "indexMap";
    MapCommon.Parameter.MarkerIcon = "https://www.1hai.cn/Content/Index/Images/mapicon.png";
    MapCommon.func.MapInitLoad(n)
}

function SetMapIcon() {
    var n = BookingInfo.Type === "get" ? "https://www.1hai.cn/Content/Index/Images/car-send.png" : "https://www.1hai.cn/Content/Index/Images/car-take.png";
    MapCommon.Parameter.MarkerIcon = n;
    MapCommon.func.MapLoad()
}

function mapPositionAddress(n, t) {
    var i = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(),
        r = "&lat=" + t + "&lng=" + n + "&cityId=" + i;
    setTimeout(function () {
        BookingAjax.ReqStoreAsync(BookingAjax.Url.MapPositionPath, r, "MapPositionPath", function (n) {
            $("#inside").show();
            $("#outside").hide();
            $("#addresslist").html(n)
        })
    }, 100)
}

function IsAllowMapService(n, t) {
    var r = BookingInfo.Type === "get" ? $("#pickUpCityId").attr("value") : $("#returnCityId").attr("value"),
        u = "&lat=" + t + "&lng=" + n + "&cityId=" + r + "&t=" + (new Date).getTime(), i = !1;
    return BookingAjax.ReqStore(BookingAjax.Url.IsFreeMapService, u, "IsAllowMapService", function (data) {
        var jsonData = eval("(" + data + ")");
        return jsonData == undefined ? (alert("暂不支持此范围送/还车"), !1) : jsonData.AllowService ? (i = !0, !0) : (alert("暂不支持此范围送/还车"), !1)
    }), i
}

function GetCity() {
    var n = new BMap.LocalCity;
    n.get(function (n) {
        var t = "上海";
        n && (t = n.name.replace("市", ""));
        t === "全国" && (t = "上海");
        BookingAjax.ReqStore(BookingAjax.Url.defaultCityPath, "city=" + encodeURIComponent(t), "DefaultCity", function (data) {
            if (data === "" || data === undefined) return $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).val("上海"), !1;
            var obj = eval("(" + data + ")");
            $("#getCarCity,#retCarCity").val(obj.cityName);
            $("#pickUpCityId,#returnCityId").val(obj.cityId);
            $("#getCarCityMenDian,#retCarCityMenDian").val(obj.storeName);
            $("#getStoreId,#retStoreId").val(obj.storeId);
            obj.isAllowSendCar === "Y" ? $("#city_get,#city_ret").show() : $("#city_get,#city_ret").hide()
        })
    })
}

function initMap() {
    var n = new BMap.LocalCity;
    n.get(function (n) {
        var t = "上海", i;
        n && (t = n.name.replace("市", ""));
        $(".hotcity-classify li").each(function () {
            var n = $(this).text();
            n.indexOf(t) > -1 && $(this).addClass("hotcity-cur").siblings().removeClass("hotcity-cur")
        });
        i = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val();
        BookingAjax.ReqStore(BookingAjax.Url.InitMapPath, "&cityId=" + i, "initmap", function (data) {
            if (data === "" || data === undefined) return !1;
            var storeList = eval("(" + data + ")");
            $("#storeMapAddress").html(storeList.storeHtml);
            initIndexMap(storeList.store)
        })
    })
}

function initHotCarType() {
    var n = new BMap.LocalCity;
    n.get(function (n) {
        var t = "上海", i;
        n && (t = n.name.replace("市", ""));
        i = !1;
        $(".hotcity-classify li").each(function () {
            var n = $(this).text();
            n.indexOf(t) > -1 && (i = !0, $(this).addClass("hotcity-cur").siblings().removeClass("hotcity-cur"))
        });
        i || (t = "上海", $(".hotcity-classify li").each(function () {
            var n = $(this).text();
            n.indexOf(t) > -1 && $(this).addClass("hotcity-cur").siblings().removeClass("hotcity-cur")
        }));
        BookingAjax.ReqStore(BookingAjax.Url.HotCartype, "&city=" + encodeURIComponent(t), "HotCartype", function (n) {
            if ($("#rzloading").addClass("hidden"), n === "" || n === undefined) return !1;
            $("#hotCartype").html(n)
        })
    })
}

function detectOS() {
    var n = navigator.userAgent, t = navigator.platform == "Win32" || navigator.platform == "Windows",
        i = navigator.platform == "Mac68K" || navigator.platform == "MacPPC" || navigator.platform == "Macintosh" || navigator.platform == "MacIntel",
        r, u, f, e, o, s, h;
    if (i) return "Mac";
    if (r = navigator.platform == "X11" && !t && !i, r) return "Unix";
    if (u = String(navigator.platform).indexOf("Linux") > -1, u) return "Linux";
    if (t) {
        if (f = n.indexOf("Windows NT 5.0") > -1 || n.indexOf("Windows 2000") > -1, f) return "Win2000";
        if (e = n.indexOf("Windows NT 5.1") > -1 || n.indexOf("Windows XP") > -1, e) return "WinXP";
        if (o = n.indexOf("Windows NT 5.2") > -1 || n.indexOf("Windows 2003") > -1, o) return "Win2003";
        if (s = n.indexOf("Windows NT 6.0") > -1 || n.indexOf("Windows Vista") > -1, s) return "WinVista";
        if (h = n.indexOf("Windows NT 6.1") > -1 || n.indexOf("Windows 7") > -1, h) return "Win7"
    }
    return "other"
}

function findDimensions() {
    var n = 0, t = 0;
    return window.innerWidth ? n = window.innerWidth : document.body && document.body.clientWidth && (n = document.body.clientWidth), window.innerHeight ? t = window.innerHeight : document.body && document.body.clientHeight && (t = document.body.clientHeight), document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth && (t = document.documentElement.clientHeight, n = document.documentElement.clientWidth), n + "-" + t
}

var _dateMap = {}, _container = {}, _angtian = {
        formatNum: function (n) {
            return n.toString().replace(/^(\d)$/, "0$1")
        }, formatStrDate: function (n) {
            switch (typeof n) {
                case"string":
                    return n = n.split(/-|\//g), n[0] + "-" + this.formatNum(n[1]) + "-" + this.formatNum(n[2]);
                case"object":
                    return n.getFullYear() + "-" + this.formatNum(n.getMonth() + 1) + "-" + this.formatNum(n.getDate())
            }
        }, formatIntDate: function (n) {
            return this.formatStrDate(n).replace(/-|\//g, "")
        }, getThreeDays: function (n) {
            var t = n.split(/-|\//g), n;
            return {}
        }, addObject: function (n, t) {
            for (var i in t) n[i] || (n[i] = t[i])
        }, getPos: function (n) {
            var i = document.documentElement.scrollTop || document.body.scrollTop,
                r = document.documentElement.scrollLeft || document.body.scrollLeft, t = n.getBoundingClientRect();
            return {top: t.top + i, left: t.left + r, right: t.right + r, bottom: t.bottom + i}
        }, $: function (n, t) {
            switch (n.charAt(0)) {
                case"#":
                    return document.getElementById(n.substring(1));
                case".":
                    for (var f = new RegExp("(^|\\s)" + n.substring(1) + "(\\s|$)"), u = [], r = _angtian.$("*", t), i = 0; i < r.length; i++) f.test(r[i].className) && u.push(r[i]);
                    return u;
                default:
                    return (t || document).getElementsByTagName(n)
            }
        }, indexOf: function (n, t) {
            for (var i = t.length; i--;) if (typeof n == "string" ? this.hasClass(t[i].children[0] || t[i], n) : n == t[i]) return i;
            return -1
        }, hasClass: function (n, t) {
            return new RegExp("(^|\\s)" + t + "(\\s|$)").test(n.className)
        }, addClass: function (n, t) {
            var i = n.className.split(/\s+/);
            this.hasClass(n, t) || i.push(t);
            n.className = i.join(" ").replace(/(^\s*)|(\s*$)/, "")
        }, removeClass: function (n, t) {
            n.className = n.className.replace(new RegExp("(^|\\s)" + t + "(\\s|$)", "g"), "").split(/\s+/).join(" ")
        }, on: function (n, t, i) {
            n.addEventListener ? n.addEventListener(t, i, !1) : n.attachEvent("on" + t, i)
        }, halt: function (n) {
            n = n || event;
            n.preventDefault ? n.preventDefault() : n.returnValue = !1;
            n.stopPropagation ? n.stopPropagation() : n.cancelBubble = !0
        }, contains: function (n, t) {
            return n.contains ? n.contains(t) : n.compareDocumentPosition ? !!(n.compareDocumentPosition(t) & 16) : void 0
        }
    }, $CAL = _angtian,
    template = ['<div class="cal-container">', "<dl>", '<dt class="date"><\/dt>', '<dt><strong style="color:#E86702">日<\/strong><\/dt>', "<dt>一<\/dt>", "<dt>二<\/dt>", "<dt>三<\/dt>", "<dt>四<\/dt>", "<dt>五<\/dt>", '<dt><strong style="color:#E86702">六<\/strong><\/dt>', "<dd><\/dd>", "<\/dl>", "<\/div>"],
    _dateName = {
        today: "今天",
        yuandan: "元旦",
        chuxi: "除夕",
        chunjie: "春节",
        yuanxiao: "元宵",
        qingming: "清明",
        wuyi: "五一",
        duanwu: "端午",
        zhongqiu: "中秋",
        guoqing: "国庆"
    }, _holidays = {
        today: [_angtian.formatStrDate(new Date(year, month, day))],
        yuandan: ["2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-01-01", "2017-01-01", "2018-01-01", "2019-01-01", "2020-01-01"],
        chuxi: ["2012-01-22", "2013-02-09", "2014-01-30", "2015-02-18", "2016-02-07", "2017-01-27", "2018-02-15", "2019-02-04", "2020-01-24"],
        chunjie: ["2012-01-23", "2013-02-10", "2014-01-31", "2015-02-19", "2016-02-08", "2017-01-28", "2018-02-16", "2019-02-05", "2020-01-25"],
        yuanxiao: ["2012-02-06", "2013-02-24", "2014-2-14", "2015-03-05", "2016-02-22", "2017-02-11", "2018-03-02", "2019-02-19", "2020-02-8"],
        qingming: ["2012-04-04", "2013-04-04", "2014-04-05", "2015-04-05", "2016-04-04", "2017-04-04", "2018-04-05", "2019-04-05", "2020-04-04"],
        wuyi: ["2012-05-01", "2013-05-01", "2014-05-01", "2015-05-01", "2016-05-01", "2017-05-01", "2018-05-01", "2019-05-01", "2020-05-01"],
        duanwu: ["2012-06-23", "2013-06-12", "2014-06-02", "2015-06-20", "2016-06-09", "2017-05-30", "2018-06-18", "2019-06-07", "2020-06-25"],
        zhongqiu: ["2012-09-30", "2013-09-19", "2014-09-08", "2015-09-27", "2016-09-15", "2017-10-04", "2018-09-24", "2019-09-13", "2020-10-01"],
        guoqing: ["2012-10-01", "2013-10-01", "2014-10-01", "2015-10-01", "2016-10-01", "2017-10-01", "2018-10-01", "2019-10-01", "2020-10-01"]
    }, BookingInfo, Floating, MapCommon;
(function () {
    var n, t;
    for (n in _holidays) if (n != "today") for (t = 0; t < _holidays[n].length; t++) _angtian.addObject(_dateMap, _angtian.getThreeDays(_holidays[n][t], _dateName[n]))
})();
Calendar.prototype = {
    constructor: Calendar,
    reg: /-|\//g,
    rDate: /^20(1[2-9]|20)-(0?[1-9]|1[0-2])-(0?[1-9]|[12]\d|3[0-1])$/,
    _init: function (n) {
        n = n || {};
        var t = "C_" + +new Date;
        _container.id = _container.id != t ? t : t + "bj" + Math.random();
        this.id = n.isPopup ? _container.id : n.id.replace(/^#/, "") || _container.id;
        this.container = _angtian.$("#" + this.id) || document.createElement("div");
        this.isSelect = n.isSelect;
        this.isPrevBtn = n.isPrevBtn;
        this.isNextBtn = n.isNextBtn;
        this.isCloseBtn = n.isCloseBtn;
        this.isPromptText = n.isPromptText;
        this.isHoliday = n.isHoliday;
        this.isHolidayTips = n.isHolidayTips;
        this.isPopup = n.isPopup;
        this.isReadonly = n.isReadonly;
        this.isDateInfo = n.isDateInfo;
        this.dateInfoClass = n.dateInfoClass || "date-info";
        this.isMessage = n.isMessage;
        this.sMessage = n.sMessage || "";
        this.CalStart = n.CalStart || null;
        this.isCalStart = n.isCalStart;
        this.CalEnd = n.CalEnd || null;
        this.isCalEnd = n.isCalEnd;
        this.count = n.count || 1;
        this.monthStep = n.monthStep || this.count;
        this.revise = {left: 0, top: 0};
        this.triggerNode = _angtian.$("#" + n.id.replace(/^#/, ""));
        this.date = n.date || new Date;
        this.year = this.date.getFullYear();
        this.month = _angtian.formatNum(this.date.getMonth() + 1);
        this.startDate = n.startDate;
        this.endDate = n.endDate;
        this.selectDate = n.selectDate && _angtian.formatStrDate(n.selectDate);
        this.range = n.range || {mindate: null, maxdate: null};
        this.onComplete = n.onComplete || function () {
        };
        this.onClose = n.onClose || function () {
        };
        this.onSelectDate = n.onSelectDate || function () {
        };
        this._create();
        this.render();
        this._addEvent()
    },
    _create: function () {
        var i = [], f = 0, u = null, t = document.createElement("div"), r = document.createElement("div"), n;
        for (this.isPrevBtn && i.push('<span class="cal-prev">prev<\/span>'), this.isNextBtn && i.push('<span class="cal-next">next<\/span>'), f = this.count; f--;) i = i.concat(template);
        t.className = "calendar";
        t.innerHTML = i.join("");
        this.isPrevBtn || this.isNextBtn || this.isCloseBtn || (t.style.paddingLeft = t.style.paddingRight = "5px");
        this.container.id = this.id;
        this.container.appendChild(t);
        this.isMessage && (this.oMsg = r, r.className = "cal-msg", r.innerHTML = this.sMessage, r.style.display = this.sMessage ? "block" : "none", this.container.insertBefore(r, t));
        !window.ActiveXObject || window.XMLHttpRequest || (u = document.createElement("iframe"), this.container.appendChild(u));
        document.getElementById(this.id) || document.body.appendChild(this.container);
        u && (n = u.style, n.position = "absolute", n.top = n.left = "-1px", n.filter = "alpha(opacity=0)", n.zIndex = -1, n.border = 0, n.width = this.container.offsetWidth + "px", n.height = this.container.offsetHeight + "px");
        this.isPopup && (this.hide().container.style.position = "absolute");
        this.triggerNode.tagName.toUpperCase() === "INPUT" && (this.isReadonly && (this.triggerNode.readOnly = !0), this.isDateInfo && (this.triggerNodeParent = document.createElement("div"), this.oDateInfo = document.createElement("span"), this.oDateInfo.className = this.dateInfoClass, this.triggerNode.style.position = "absolute", this.triggerNodeParent.style.position = "relative", this.triggerNodeParent.style.width = this.triggerNode.offsetWidth + "px", this.triggerNodeParent.style.height = this.triggerNode.offsetHeight + "px", this.triggerNode.parentNode.insertBefore(this.triggerNodeParent, this.triggerNode), this.triggerNodeParent.appendChild(this.triggerNode), this.triggerNodeParent.appendChild(this.oDateInfo)), this.triggerNode.value != "" && this.isHolidayTips && this.setDateInfo());
        this.onComplete()
    },
    _draw: function (n, t) {
        var f = this, e = n.getElementsByTagName("dt")[0], o = n.getElementsByTagName("dd")[0],
            s = document.createDocumentFragment(), h = document.createDocumentFragment(), i, c, u, r;
        if (this.isSelect) {
            for (u = document.createElement("div"), this.selectYear = document.createElement("select"), this.selectMonth = document.createElement("select"), c = document.createDocumentFragment(), r = (new Date).getFullYear(); r >= 1900; r--) i = document.createElement("option"), i.value = i.innerHTML = r, i.selected = this.year == r, s.appendChild(i);
            for (r = 1; r <= 12; r++) i = document.createElement("option"), i.value = i.innerHTML = r, i.selected = this.month == r, h.appendChild(i);
            this.selectYear.appendChild(s);
            this.selectMonth.appendChild(h);
            u.appendChild(this.selectYear);
            u.appendChild(this.selectMonth);
            u.appendChild(document.createTextNode("月"));
            u.insertBefore(document.createTextNode("年"), this.selectMonth);
            e.innerHTML = "";
            e.appendChild(u);
            this.selectYear.onchange = this.selectMonth.onchange = function () {
                f.render(new Date(f.selectYear.value, f.selectMonth.value - 1))
            }
        } else e.innerHTML = t.year + "年" + t.month + "月";
        o.innerHTML = "";
        o.appendChild(this._createDays(t.year, t.month))
    },
    _createDays: function (n, t) {
        for (var c = new Date(n, t, 0).getDate(), l = new Date(n, t - 1, 1).getDay(), u = [], o = document.createDocumentFragment(), s, e, i, f, h, r = l; r--;) u.push(0);
        for (r = 1; r <= c; r++) u.push(r);
        while (u.length) for (r = 0, s = u.length; r < s; r++) if (u.length) {
            if (i = document.createElement("a"), e = u.shift(), e) {
                if (i.href = "javascript:void(0)", i.innerHTML = e, i["data-date"] = _angtian.formatStrDate(n + "-" + t + "-" + e), f = _angtian.formatIntDate(i["data-date"]), this.range.mindate && f < _angtian.formatIntDate(this.range.mindate) && (i.className = "disabled"), this.range.maxdate && f > _angtian.formatIntDate(this.range.maxdate) && (i.className = "disabled"), this.isHoliday) for (h in _dateName) i.className != "disabled" && this._isHoliday(i, h);
                this.selectDate == i["data-date"] && ((i.children[0] || i).className = "selected");
                this.startDate == i["data-date"] && ((i.children[0] || i).className = "start-date");
                this.endDate == i["data-date"] && ((i.children[0] || i).className = "end-date");
                this.startDate && this.endDate && f > this.startDate.replace(this.reg, "") && f < this.endDate.replace(this.reg, "") && ((i.children[0] || i).className = "select-range")
            } else i.className = "disabled", i.innerHTML = "&nbsp;";
            o.appendChild(i)
        }
        return o
    },
    _isHoliday: function (n, t) {
        new RegExp(n["data-date"]).test(_holidays[t].join()) && (n.className = t, n.innerHTML = "<span>" + n.innerHTML.replace(/<[^>]+>/, "") + "<\/span>")
    },
    _setPos: function () {
        var n, i, t, r = /msie\s(\d+\.\d+)/i.test(navigator.userAgent) ? RegExp.$1 : undefined;
        n = _angtian.getPos(this.triggerNode).bottom + this.revise.top - (r < 8 ? 2 : 0);
        i = _angtian.getPos(this.triggerNode).left + this.revise.left - (r < 8 ? 2 : 0);
        t = n - 211 - this.triggerNode.offsetHeight - this.revise.top * 2;
        n > document.documentElement.clientHeight + (document.documentElement.scrollTop || document.body.scrollTop) - 211 && (n = t < 0 ? n : t);
        this.container.style.top = n + "px";
        this.container.style.left = i + "px"
    },
    _addEvent: function () {
        var n = this, t = this.container;
        _angtian.on(t, "mousedown", function (i) {
            n.isHide = 0;
            n.closeTimer && clearTimeout(n.closeTimer);
            i = i || event;
            var r = i.target || i.srcElement;
            switch (r.className) {
                case"cal-close":
                    n.hide();
                    break;
                case"cal-prev":
                    n.prevMonth();
                    break;
                case"cal-next":
                    n.nextMonth()
            }
            if (r.parentNode.tagName.toUpperCase() === "A" && (r = r.parentNode), r.tagName.toUpperCase() === "A" && r.className != "disabled") {
                n.onSelectDate(r);
                n.triggerNode.tagName.toUpperCase() === "INPUT" && (n.triggerNode.value = r["data-date"], n.isDateInfo && n.setDateInfo(r["data-date"]), n.hide())
            }
            n.isPopup && (n.isCalStart || _angtian.contains(t, r)) && _angtian.halt(i)
        });
        if (this.isPopup) {
            _angtian.on(this.triggerNode, "focus", function (t) {
                n.isHide = !1;
                n.hide();
                n.closeTimer && clearTimeout(n.closeTimer);
                t = t || event;
                var r = t.target || t.srcElement, i = _angtian.$("iframe", n.container)[0];
                n._setPos();
                n.show();
                r.select && r.select();
                i && (i.style.width = n.container.offsetWidth + "px", i.style.height = n.container.offsetHeight + "px")
            });
            _angtian.on(this.triggerNode, "click", function (t) {
                n.isHide = !1;
                n.hide();
                n.closeTimer && clearTimeout(n.closeTimer);
                t = t || event;
                var r = t.target || t.srcElement, i = _angtian.$("iframe", n.container)[0];
                n._setPos();
                n.show();
                r.select && r.select();
                i && (i.style.width = n.container.offsetWidth + "px", i.style.height = n.container.offsetHeight + "px")
            });
            _angtian.on(this.triggerNode, "blur", function () {
                n.closeTimer = setTimeout(function () {
                    n.isHide && n.hide()
                }, 150)
            });
            _angtian.on(document, "mousedown", function () {
                n.hide()
            });
            _angtian.on(window, "resize", function () {
                n._setPos()
            })
        }
        if (this.oDateInfo) _angtian.on(this.oDateInfo, "click", function (t) {
            n.focus();
            _angtian.halt(t || event)
        })
    },
    render: function (n) {
        var n = n || this.date, u = _angtian.$(".cal-container", this.container), r, t, i;
        for (n = typeof n == "string" ? new Date(n.split(this.reg)[0], _angtian.formatNum(n.split(this.reg)[1] - 1)) : n, r = n.getFullYear(), t = n.getMonth() + 1, this.year = r, this.month = t, i = 0, len = u.length; i < len; i++) r += t + (i ? 1 : 0) > 12 ? 1 : 0, t = (t + (i ? 1 : 0)) % 12 || 12, this._draw(u[i], {
            year: r,
            month: t
        })
    },
    nextMonth: function () {
        this.render(new Date(this.year, this.month + (this.monthStep - 1), 1))
    },
    prevMonth: function () {
        this.render(new Date(this.year, this.month - (this.monthStep + 1), 1))
    },
    show: function () {
        return this.container.style.display = "block", this
    },
    hide: function () {
        return this.container.style.display = "none", this.onClose(), this
    },
    setDateInfo: function (n) {
        n = n || this.triggerNode.value;
        this.oDateInfo.innerHTML = this.rDate.test(n) ? (this.render(n), this.getDateInfo(n)[this.isHoliday ? "holiday" : "week"]) : "";
        this.oDateInfo.innerHTML = this.rDate.test(n) ? (this.triggerNode.value = n, this.render(n), this.getDateInfo(n)[this.isHoliday ? "holiday" : "week"]) : ""
    },
    getDateInfo: function (n) {
        var f = this, i = n.split(this.reg), e = new Date(i[0], i[1] - 1, i[2]), o = ["今天", "明天", "后天"],
            r = "周" + ["日", "一", "二", "三", "四", "五", "六"][e.getDay()], t, u;
        return {
            week: r, holiday: function () {
                for (u in _holidays) if (new RegExp(n).test(_holidays[u])) return _dateName[u];
                return (t = _angtian.formatIntDate(n) - _angtian.formatIntDate(new Date), t >= 0 && t <= 2) ? o[t] : f.isHolidayTips ? _dateMap[n] || r : r
            }()
        }
    },
    showRange: function () {
        var n = this;
        _angtian.on(this.container, "mouseover", function (t) {
            var e;
            t = t || event;
            var u = t.target || t.srcElement, r = _angtian.$("a", n.container), o = _angtian.indexOf("start-date", r),
                f = function () {
                    for (i = r.length; i--;) _angtian.removeClass(r[i].children[0] || r[i], "hover")
                }, i;
            if (n.startDate) if (u.parentNode.tagName.toUpperCase() === "A" && (u = u.parentNode), u.tagName.toUpperCase() === "A") for (e = _angtian.indexOf(u, r), f(), i = o + 1; i < e; i++) _angtian.hasClass(r[i].children[0] || r[i], "end-date") || _angtian.addClass(r[i].children[0] || r[i], "hover"); else f()
        })
    },
    focus: function () {
        this.triggerNode.focus()
    },
    keyup: function () {
        var n = this, i = n.CalStart, t = n.CalEnd;
        _angtian.on(n.triggerNode, "keyup", function (r) {
            r = r || event;
            var f = r.target || r.srcElement, u = f.value;
            n.rDate.test(u) ? (u = _angtian.formatStrDate(u), u != (n.isCal_start ? n.startDate : n.endDate) && (n.isCalStart ? (i.startDate = t.startDate = u, i.render(u), n.setDateInfo(n.triggerNode.value), t.render(t.endDate || u)) : n.isCalEnd && (i.endDate = t.endDate = u, t.render(u), n.setDateInfo(n.triggerNode.value), i.render()))) : (n.isCalStart ? (i.startDate = t.startDate = "", i.render(new Date), t.render(new Date)) : n.isCalEnd && (i.endDate = t.endDate = "", i.render(new Date), t.render(new Date)), n.setDateInfo(""))
        })
    },
    showMessage: function (n) {
        this.oMsg && (this.oMsg.innerHTML = n, this.oMsg.style.display = "block", this.focus())
    },
    hideMessage: function () {
        this.oMsg && (this.oMsg.style.display = "none")
    }
};
$(function () {
    function f(t) {
        var c = $("#getTime").val(), l = $("#retTime").val(), f, e, s, h;
        switch (this.triggerNode.id) {
            case r:
                f = dateFormat(t["data-date"]);
                e = new Date((f / 1e3 + 172800) * 1e3);
                n.setDateInfo(e.Format("yyyy-MM-dd"));
                n.range.mindate = f;
                n.startDate = this.startDate = t["data-date"];
                n.render(this.startDate);
                this.render(this.startDate);
                n.focus();
                f.setHours(c);
                e.setHours(l);
                $("#rentDay").text(o(f, e));
                break;
            case u:
                s = dateFormat(t["data-date"]);
                h = dateFormat($("#book_StartCldDate_J_date_1").val());
                i.endDate = this.endDate = t["data-date"];
                i.render(this.endDate);
                this.render(this.endDate);
                h.setHours(c);
                s.setHours(l);
                $("#rentDay").text(o(h, s))
        }
    }

    function e() {
        this.hideMessage()
    }

    function o(n, t) {
        var e = 864e5, o = 36e5, u = n, f = t, s = (f.getTime() - u.getTime()) / e, r, h, i;
        return s >= 0 ? (r = Math.floor((f.getTime() - u.getTime()) / e), h = s - r, h === 0) ? r + "天" : (i = (f.getTime() - u.getTime()) / o, i = i - r * 24, r + "天" + i + "小时") : (i = (f.getTime() - u.getTime()) / o, i + "小时")
    }

    var r = $("#hdnfromdate").attr("value"), u = $("#hdntodate").attr("value"), t = new Date, i = new Calendar({
        id: r,
        isPopup: !0,
        isPrevBtn: !0,
        isNextBtn: !0,
        isPromptText: !0,
        isCloseBtn: !0,
        isHoliday: !0,
        isHolidayTips: !0,
        isDateInfo: !0,
        isMessage: !0,
        isCalStart: !0,
        dateInfoClass: "date-info-start",
        range: {mindate: $CAL.formatStrDate(t), maxdate: new Date(t.getFullYear(), t.getMonth(), t.getDate() + 188)},
        count: 2,
        monthStep: 1,
        onSelectDate: f,
        onClose: e
    }), n = new Calendar({
        id: u,
        isPopup: !0,
        isPrevBtn: !0,
        isNextBtn: !0,
        isPromptText: !0,
        isCloseBtn: !0,
        isHoliday: !0,
        isHolidayTips: !0,
        isDateInfo: !0,
        isMessage: !0,
        isCalEnd: !0,
        dateInfoClass: "date-info-end",
        range: {mindate: $CAL.formatStrDate(t), maxdate: new Date(t.getFullYear(), t.getMonth(), t.getDate() + 188)},
        count: 2,
        monthStep: 1,
        onSelectDate: f,
        onClose: e
    });
    i.container.className = "cal-start";
    n.container.className = "cal-end";
    n.showRange();
    i.CalStart = n.CalStart = i;
    i.CalEnd = n.CalEnd = n;
    i.keyup();
    n.keyup();
    Date.prototype.Format = function (format) {
        var resultDate = "", o = {y: this.getFullYear(), M: this.getMonth() + 1, d: this.getDate()}, source = eval(o),
            k, len;
        for (k in source) len = o[k].toString().length, new RegExp(k + "+").test(format) && (resultDate += k === "d" ? len === 1 ? "0" + o[k] : o[k] : (len === 1 ? "0" + o[k] : o[k]) + "-");
        return resultDate
    }
});
$(function () {
    function f(n) {
        var t, i, f, e;
        switch (this.triggerNode.id) {
            case r:
                this.render(this.startDate);
                t = n["data-date"];
                i = $("#book_gjEndCldDate_gJ_date_2").val();
                $("#gjrenday").text(o(dateFormat(t), dateFormat(i)));
                break;
            case u:
                this.render(this.endDate);
                f = n["data-date"];
                e = $("#book_gjStartCldDate_gJ_date_1").val();
                $("#gjrenday").text(o(dateFormat(e), dateFormat(f)))
        }
    }

    function e() {
        this.hideMessage()
    }

    function o(n, t) {
        var i = n, r = t, u = Math.floor((r.getTime() - i.getTime()) / 864e5);
        return "租期：" + u + "天"
    }

    var r = $("#hdngjfromdate").attr("value"), u = $("#hdngjtodate").attr("value"), n = new Date, i = new Calendar({
        id: r,
        isPopup: !0,
        isPrevBtn: !0,
        isNextBtn: !0,
        isPromptText: !0,
        isCloseBtn: !0,
        isHoliday: !0,
        isHolidayTips: !0,
        isDateInfo: !0,
        isMessage: !0,
        isCalStart: !0,
        dateInfoClass: "date-info-start",
        range: {mindate: $CAL.formatStrDate(n), maxdate: new Date(n.getFullYear(), n.getMonth() + 6, n.getDate())},
        count: 2,
        monthStep: 1,
        onSelectDate: f,
        onClose: e
    }), t = new Calendar({
        id: u,
        isPopup: !0,
        isPrevBtn: !0,
        isNextBtn: !0,
        isPromptText: !0,
        isCloseBtn: !0,
        isHoliday: !0,
        isHolidayTips: !0,
        isDateInfo: !0,
        isMessage: !0,
        isCalEnd: !0,
        dateInfoClass: "date-info-end",
        range: {mindate: $CAL.formatStrDate(n), maxdate: new Date(n.getFullYear(), n.getMonth() + 6, n.getDate())},
        count: 2,
        monthStep: 1,
        onSelectDate: f,
        onClose: e
    });
    i.container.className = "cal-start";
    t.container.className = "cal-end";
    t.showRange();
    i.CalStart = t.CalStart = i;
    i.CalEnd = t.CalEnd = t;
    i.keyup();
    t.keyup()
}), function (n) {
    n.suggest = function (t, i) {
        function f() {
            if (!r.is(":visible")) return !1;
            var n = r.children("ul").children("li." + i.selectedClass);
            return n.length || (n = !1), n
        }

        function s() {
            $currentResult = f();
            $currentResult ? $currentResult.removeClass(i.selectedClass).next().addClass(i.selectedClass) : r.children("ul").children("li:first-child").addClass(i.selectedClass)
        }

        function h() {
            $currentResult = f();
            $currentResult ? $currentResult.removeClass(i.selectedClass).prev().addClass(i.selectedClass) : r.children("ul").children("li:last-child").addClass(i.selectedClass)
        }

        function c(t) {
            if ($currentResult = f(), $currentResult) {
                t.val($currentResult.attr("rel"));
                var u = n("#city_get"), r = n("#city_ret"), i = $currentResult.attr("ac") === "Y";
                BookingInfo.Type === "get" ? (i ? u.show() : u.hide(), i ? r.show() : r.hide(), i || (n(BookTarget.SendServiceCheckId + "," + BookTarget.ReturnServiceCheckId).attr("checked", !1), n(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).show(), n(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).hide()), n(BookTarget.PickupStoreNameId).val("").attr("placeholder", "请选择取车营业门店"), n(BookTarget.ReturnStoreNameId).val("").attr("placeholder", "请选择还车营业门店")) : (i ? r.show() : r.hide(), i || (n(BookTarget.ReturnServiceCheckId).attr("checked", !1), n(BookTarget.ReturnStoreNameId).show(), n(BookTarget.ReturnServiceId).hide()), n(BookTarget.ReturnStoreNameId).val("").attr("placeholder", "请选择还车营业门店"))
            }
        }

        function o(n) {
            for (var u = "", e = "", f, o, t = 0; t < i.source.length; t++) f = new RegExp("^" + n + ".*$", "im"), (f.test(i.source[t][0]) || f.test(i.source[t][2])) && (u += '<li rel="' + i.source[t][0] + '" ac="' + i.source[t][3] + '" cid="' + i.source[t][4] + '"><a href="#' + t + '"><span class="city-zh">' + i.source[t][0] + '<\/span><span class="city-pinyin"><\/span><\/a><\/li>');
            if (u === "") for (t = 0; t < i.source.length; t++) o = new RegExp("^" + n + ".*$", "im"), o.test(i.source[t][1]) && (u += '<li rel="' + i.source[t][0] + '" ac="' + i.source[t][3] + '" cid="' + i.source[t][4] + '"><a href="#' + t + '"><span class="city-zh">' + i.source[t][0] + '<\/span><span class="city-pinyin"><\/span><\/a><\/li>');
            e = u === "" ? '<div class="citybox-confirm"><span>对不起,找不到:<\/span><span>' + n + "<\/span><\/div>" : '<div class="citybox-confirm"><span>' + n + "<\/span><span>,按拼音搜索排序<\/span><\/div>";
            u = e + '<ul class="inquire-city-list">' + u + "<\/ul>";
            r.html(u).show()
        }

        var e = n(t).attr("autocomplete", "off"), r, u;
        i.attachObject || (i.attachObject = n(document.createElement("div")).appendTo("body"));
        r = n(i.attachObject);
        u = "";
        e.blur(function () {
            var r, f, t, e;
            if (n.trim(n(this).val()) === "") {
                n(this).val(u);
                return
            }
            for (r = !1, f = n.trim(n(this).val()), t = 0; t < i.checkObj.length; t++) if (e = new RegExp("^" + f + ".*$", "im"), e.test(i.source[t][0]) && f === i.source[t][0]) {
                r = !0;
                return
            }
            r || n(this).val(u)
        }).focus(function () {
            u = n(this).attr("value")
        });
        e.keyup(function (t) {
            if (n.trim(n(this).val()) !== "") switch (t.keyCode) {
                case 38:
                    h();
                    break;
                case 40:
                    s();
                    break;
                case 13:
                    c(n(this));
                    o(n.trim(n(this).val()));
                    r.children("ul").children("li:first-child").addClass(i.selectedClass);
                    break;
                default:
                    o(n.trim(n(this).val()));
                    r.children("ul").children("li:first-child").addClass(i.selectedClass)
            }
        })
    };
    n.fn.autoComplete = function (t, i) {
        if (t) return i.source = t, i.attachObject = i.attachObject || null, i.checkObj = i.checkObj || null, i.selectedClass = i.selectedClass, n.suggest(this, i), this
    };
    n.fn.serializeJson = function () {
        var t = {};
        return n(this.serializeArray()).each(function () {
            t[this.name] = this.value
        }), t
    }
}(jQuery);
BookingInfo = {
    Initialize: function (n, t, i, r, u) {
        this.CityName = n;
        this.StoreName = t;
        this.Address = i;
        this.Date = r;
        this.Hour = u
    }, Type: function (n) {
        this.Type = n
    }, IsSendAndReturnService: function (n) {
        this.IsSendAndReturnService = n
    }
};
Floating = {
    Initialize: function (n, t) {
        this.Source = n;
        this.TargetSource = t
    }, IsMouseOut: function (n) {
        this.IsMouseOut = n
    }, IsServiceMouseOut: function (n) {
        this.IsServiceMouseOut = n
    }, IsHide: function () {
        return this.Source == null && this.Target == null
    }, XyOpts: {}, VerticalPosition: function (n) {
        var t = $(n).position(), i = $(n).attr("id");
        this.XyOpts[n] || (this.XyOpts[i] = {
            left: t.left + "px",
            top: t.top + 26 + "px",
            position: "absolute",
            "z-index": 99
        })
    }, InternationalVerticalPosition: function (n) {
        var t = $(n).position(), i = $(n).attr("id");
        this.XyOpts[n] || (this.XyOpts[i] = {
            left: t.left + "px",
            top: t.top + 30 + "px",
            position: "absolute",
            "z-index": 99
        })
    }, HorizontalPosition: function (n) {
        var i = $(n).position(), r = $(n).attr("id"), t = $(BookTarget.PickupStoreNameId).width();
        t = t > 150 ? t + 29 : t + 25;
        this.XyOpts[n] || (this.XyOpts[r] = {
            left: i.left + t + "px",
            top: i.top + "px",
            position: "absolute",
            "z-index": 99
        })
    }, IsShow: function (n, t, i) {
        i == FloatTarget.FlightNumber ? (this.HorizontalPosition(t), $(i).css(this.XyOpts[$(t).attr("id")]).show()) : (this.VerticalPosition(t), $(i).css(this.XyOpts[$(t).attr("id")]).show())
    }, InternationalIsShow: function (n, t, i) {
        this.InternationalVerticalPosition(t);
        $(i).css(this.XyOpts[$(t).attr("id")]).show()
    }
};
FloatTarget = {
    Initialize: function (n, t, i, r, u, f, e, o) {
        this.CityBoxId = "#" + n;
        this.StoreBoxId = "#" + t;
        this.SendBoxId = "#" + i;
        this.FreeId = "#" + r;
        this.SelectTime = "#" + u;
        this.FlightNumber = "#" + f;
        this.CityAutoBoxId = "#" + e;
        this.TimeSelectMinute = "#" + o
    },
    FloatBoxIdList: function () {
        return this.CityBoxId + "," + this.StoreBoxId + "," + this.SendBoxId + "," + this.FreeId + "," + FloatTarget.FlightNumber + "," + this.SelectTime + "," + this.CityAutoBoxId + ",#gjtimeselect,#gjCity," + this.TimeSelectMinute
    },
    CityBoxTarget: {
        CitySpan: ".ydcity-box .list-city li dl dd span",
        CityLi: ".ydcity-box .list-city li",
        CityTab: " .ydcity-box .list-type li"
    },
    StoreBoxTarget: {
        StoreContentSpan: ".ydk-box .list-mendian li .dl-mendian dd span",
        StoreTabLi: ".ydk-box .list-area li",
        StoreContentLi: ".ydk-box .list-mendian  li",
        StoreDetail: ".ydk-box .inf-box",
        StoreAdd: ".ydk-box .inf-box .inf-address .address",
        StoreSend: ".ydk-box .inf-box .inf-address .sp-scd",
        StoreTime: ".ydk-box .inf-box .inf-time .txt-time",
        StoreMap: ".ydk-box .inf-box .inf-address li .link-map",
        StorePhoneNumber: ".ydk-box .inf-box .inf-time .storephone span"
    },
    ServiceTarger: {
        City: "#shcBox .list-city li",
        LeftInput: "#txtSelectType",
        LeftSelectType: ".shc-form .select-type .select-showbox",
        RightInput: "#txtSelectArea",
        RightSelectArea: ".shc-form .select-area .select-showbox",
        Address: "#txtShcAddress",
        ListCityLi: ".shc-box .list-city li",
        SelectBox: ".shc-form .select-showbox",
        ServicePrice: ".shc-form .op-box .txt-price .price",
        ServiceSelectShowBoxLi: ".shc-form .select-showbox .type-list li"
    },
    FreeRoad: {
        Roadspan: ".road ul li span",
        Community: ".community ul.cun li",
        Back: ".free .back",
        CommunityId: "#community"
    },
    IsFreeSendService: function (n, t) {
        return n != null && n.indexOf(t) > -1
    },
    TabHF: {tabTitleLi: ".tabHF-title li", tabContent: ".tabHF-content", tabContentLi: ".tabHF-content li"}
};
var BookTarget = {
    Initialize: function (n, t, i, r, u, f, e, o, s, h, c, l, a, v, y) {
        this.PickupCityId = "#" + n;
        this.ReturnCityId = "#" + t;
        this.PickupStoreNameId = "#" + i;
        this.ReturnStoreNameId = "#" + r;
        this.SendServiceCheckId = "#" + u;
        this.ReturnServiceCheckId = "#" + f;
        this.SendServiceId = "#" + e;
        this.ReturnServiceId = "#" + o;
        this.FromDateId = "#" + s;
        this.ToDateId = "#" + h;
        this.FromTimeId = "#" + c;
        this.ToTimeId = "#" + l;
        this.FromMinuteId = "#" + v;
        this.ToMinuteId = "#" + y;
        this.SameReturnAddress = "#" + a
    },
    PickupStoreID: "#getStoreId",
    ReturnStoreID: "#retStoreId",
    PickupHourID: "#getTime",
    ReturnHourID: "#retTime",
    FlightNumberID: "#flightNumber",
    PickUpFreeServicePointId: "#PickUpFreeServicePointId",
    ReturnFreeServicePointId: "#ReturnFreeServicePointId",
    DisplayType: "#hdnDisplayType",
    AhrNearStore: "#ahrNearStore",
    Address: "#txtAddress"
}, BookingAjax = {
    Url: {
        StorePath: StorePath,
        ServicePath: ServicePath,
        FreeServiceRoadPath: FreeServiceRoadPath,
        FreeServiceDistrictPath: FreeServiceDistrictPath,
        StoreTimePath: StoreTimePath,
        ValidaPath: ValidaPath,
        defaultCityPath: defaultCityPath,
        defaultStorePath: defaultStorePath,
        IndexAjax: indexAjax,
        ServiceMap: ServiceMap,
        MapPositionAddress: MapPositionAddress,
        MapPositionPath: MapPositionPath,
        IsFreeMapService: IsFreeMapService,
        InitMapPath: InitMapPath,
        HotCartype: HotCartype,
        SearchNearAddress: SearchNearAddress,
        SpotPath: SpotPath
    },
    ReqStore: function (n, t, i, r) {
        var u = this;
        return t in u.ResData[i] ? (r(u.ResData[i][t]), !1) : ($.ajax({
            type: "get",
            url: encodeURI(n + t + "&t=" + Math.random()),
            contentType: "application/json;charset=UTF-8",
            async: !1,
            cache: !1,
            success: function (n) {
                u.ResData[i][t] = n;
                r(n)
            }
        }), !1)
    },
    ReqStoreAsync: function (n, t, i, r) {
        var u = this;
        return t in u.ResData[i] ? (r(u.ResData[i][t]), !1) : ($.ajax({
            type: "get",
            url: encodeURI(n + t + "&t=" + Math.random()),
            contentType: "application/json;charset=UTF-8",
            async: !0,
            success: function (n) {
                u.ResData[i][t] = n;
                r(n)
            }
        }), !1)
    },
    ReqAjax: function (n, t, i, r, u, f) {
        var e = this;
        return t in e.ResData[r] ? (f(e.ResData[r][t]), !1) : ($.ajax({
            type: i,
            data: t,
            url: n,
            dataType: u,
            contentType: "application/json;charset=UTF-8",
            async: !1,
            cache: !1,
            success: function (n) {
                e.ResData[r][t] = n;
                f(n)
            }
        }), !1)
    },
    ReqService: function (n, t, i, r) {
        var u = this;
        return t in u.ResData[r] ? ($(i).html(""), $(i).html(u.ResData[r][t]), !1) : ($(i).html('<li class="btn-subload" style="display:block;"><\/li>'), $(i).load(n, t, function (n) {
            u.ResData[r][t] = n
        }), !1)
    },
    ReqSubmit: function (n, t) {
        $.ajax({
            type: "post", url: n, contentType: "application/json", async: !1, success: function (n) {
                t(n)
            }
        })
    },
    ResData: {
        DefaultCity: {},
        DefaultStore: {},
        ReturnStore: {},
        Store: {},
        NearStore: {},
        SendAndReturnService: {},
        SendAndReturnCity: {},
        FreeService: {},
        FreeServiceRoad: {},
        SelectedTime: {},
        ServiceMap: {},
        MapPositionAddress: {},
        MapPositionPath: {},
        IsAllowMapService: {},
        nba: {},
        initmap: {},
        HotCartype: {},
        InternationalCity: {},
        searchNearAddress: {},
        SportStore: {},
        ReturnSportStore: {},
        ReturnNearStore: {}
    }
}, initializeObj = function (n, t, i) {
    BookingInfo.Type = n.indexOf(i) > -1 ? "get" : "ret";
    Floating.Source = t
};
$(function () {
    function e() {
        var n, t;
        $("#shcMapBox").removeClass("hidden");
        n = BookingInfo.Type === "get" ? "送车上门" : "上门取车";
        $("#send-replace,#send-replace2").text(n);
        $("#SearchStore").attr("placeholder", "输入" + n + "地址");
        t = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val();
        BookingAjax.ReqStore(BookingAjax.Url.ServiceMap, t, "ServiceMap", function (data) {
            var obj, json, param;
            if (data == "") return $("#inside").hide(), $("#outside").show(), !1;
            obj = eval("(" + data + ")");
            json = obj.Range;
            obj.Range[0] == null && (json = data);
            initServiceMap(obj.CityCenter.Lat, obj.CityCenter.Lng, json, 12);
            param = "&lat=" + obj.CityCenter.Lat + "&lng=" + obj.CityCenter.Lng + "&cityId=" + t;
            BookingAjax.ReqStore(BookingAjax.Url.MapPositionPath, param, "MapPositionPath", function (n) {
                n === "" ? ($("#inside").hide(), $("#outside").show()) : ($("#inside").show(), $("#outside").hide(), $("#addresslist").html(n))
            })
        })
    }

    function l() {
        for (var source = eval("(" + arrCity + ")"), cities = [], checkObj = [], i = 0; i < source.arrObj.length; i++) cities[i] = [source.arrObj[i].cs, source.arrObj[i].py, source.arrObj[i].jc, source.arrObj[i].ac, source.arrObj[i].cid];
        for (i = 0; i < source.checkObj.length; i++) checkObj[i] = new Array(source.checkObj[i].cs);
        $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).autoComplete(cities, {
            attachObject: ".inquire-citybox",
            selectedClass: "citybox-select",
            checkObj: checkObj
        })
    }

    var s, t, i, o, r, u;
    BookTarget.Initialize("getCarCity", "retCarCity", "getCarCityMenDian", "retCarCityMenDian", "getCheck", "retCheck", "txtGetCarAddress", "txtDropCarAddress", "book_StartCldDate_J_date_1", "book_EndCldDate_J_date_2", "book_StartCldDate_gethour", "book_EndCldDate_rethour", "sameReturnAddress", "getAddress", "retAddress", "book_StartCldDate_getminute", "book_EndCldDate_retminute");
    FloatTarget.Initialize("ydcityBox", "ydkBox", "shcBox", "getfree", "timeselect", "hbh-box", "cityAutoBox", "timeselectminute");
    Floating.Initialize();
    BookingInfo.Initialize("上海");
    s = function () {
        var n = $("#book_StartCldDate_lblgetCurrHour").text().replace("时", ""),
            t = $("#book_EndCldDate_lblretCurrHour").text().replace("时", "");
        $("#getTime").val(n);
        $("#retTime").val(t)
    }();
    t = function (n, t) {
        n ? $(BookTarget.PickupStoreNameId).attr("placeholder", "请选择取车营业门店") : $(BookTarget.SendServiceId).attr("placeholder", "请输入送车上门地址");
        t ? $(BookTarget.ReturnStoreNameId).attr("placeholder", "请选择还车营业门店") : $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址")
    };
    $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).click(function () {
        $(this).select();
        BookingInfo.CityName = $(this).attr("value");
        initializeObj($(this).attr("id"), $(FloatTarget.CityBoxId), "getCarCity");
        Floating.IsShow(BookingInfo.Type, this, FloatTarget.CityBoxId);
        $(FloatTarget.CityBoxTarget.CitySpan).removeClass("selected hover");
        var n = 0;
        $.trim($(FloatTarget.CityBoxTarget.CityLi).eq(0).find("span[rel='" + BookingInfo.CityName + "']").text()) === "" && (n = $(FloatTarget.CityBoxTarget.CitySpan + "[rel='" + BookingInfo.CityName + "']").parents(FloatTarget.CityBoxTarget.CityLi).index());
        $(FloatTarget.CityBoxTarget.CitySpan + "[rel='" + BookingInfo.CityName + "']").addClass("hover");
        $(FloatTarget.CityBoxTarget.CityLi).eq(n).show().siblings().hide();
        $(FloatTarget.CityBoxTarget.CityTab).eq(n).addClass("current").siblings().removeClass("current")
    });
    $(FloatTarget.CityBoxTarget.CitySpan).click(function () {
        var t = $(this), r = $("#city_get"), i = $("#city_ret"), n;
        BookingInfo.CityName = t.text();
        n = t.attr("sendcar") === "Y";
        BookingInfo.Type === "get" ? (n ? r.show() : r.hide(), n ? i.show() : i.hide(), n || ($(BookTarget.SendServiceCheckId + "," + BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).show(), $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).hide()), $("#getlng,#getlat,#retlng,#retlat,#getAddress,#retAddress").val(""), $("#pickUpCityId,#returnCityId").attr("value", t.attr("cid")), $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).attr("value", BookingInfo.CityName), $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).val(""), $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).val(""), $(BookTarget.PickupStoreNameId).attr("placeholder", "请选择取车营业门店"), $(BookTarget.ReturnStoreNameId).attr("placeholder", "请选择还车营业门店"), $(BookTarget.SendServiceId).attr("placeholder", "请输入送车上门地址"), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址")) : (n ? i.show() : i.hide(), n || ($(BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.ReturnStoreNameId).show(), $(BookTarget.ReturnServiceId).hide()), $("#returnCityId").attr("value", t.attr("cid")), $("#retlng,#retlat,#retAddress").val(""), $(BookTarget.ReturnCityId).attr("value", BookingInfo.CityName), $(BookTarget.ReturnStoreNameId).val(""), $(BookTarget.ReturnServiceId).val(""), $(BookTarget.ReturnStoreNameId).attr("placeholder", "请选择还车营业门店"), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址"));
        Floating.Source.hide()
    });
    $(document).delegate(FloatTarget.CityBoxTarget.CitySpan + "," + FloatTarget.ServiceTarger.ListCityLi, "hover", function (n) {
        var t = $("#" + BookingInfo.Type + "Check").attr("checked") ? "current" : "hover";
        n.type === "mouseenter" ? $(this).addClass(t) : $(this).removeClass(t)
    });
    $(document).delegate(FloatTarget.StoreBoxTarget.StoreContentSpan, "mouseover", function () {
        $(FloatTarget.StoreBoxTarget.StoreContentSpan).removeClass("hover");
        $(this).addClass("hover");
        n($(this))
    });
    $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId + ",#gett,#rett").click(function () {
        var n = "#" + $(this).attr("id");
        n = n.indexOf("get") > -1 ? BookTarget.PickupStoreNameId : BookTarget.ReturnStoreNameId;
        $(FloatTarget.StoreBoxId).html("");
        initializeObj(n, $(FloatTarget.StoreBoxId), "getCarCityMenDian");
        BookingInfo.StoreName = $(n).attr("value");
        Floating.IsShow(BookingInfo.Type, n, FloatTarget.StoreBoxId);
        var t = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(),
            i = t + "&isPickupService=" + (BookingInfo.Type === "get"), r = BookingAjax.Url.StorePath,
            u = BookingInfo.Type === "get" ? "Store" : "ReturnStore";
        BookingAjax.ReqStore(r, i, u, f)
    });
    $(document).delegate(FloatTarget.StoreBoxTarget.StoreContentSpan, "click", function () {
        var f, e, o;
        BookingInfo.StoreName = $.trim($(this).text());
        var n = $(this).attr("sid"), t = $(this).data("cid"), u = $(this).data("cname");
        BookingInfo.StoreName.indexOf("免费") > -1 ? (BookingInfo.Type === "get" ? $(BookTarget.SendServiceCheckId).attr("checked", !0) : $(BookTarget.ReturnServiceCheckId).attr("checked", !0), f = BookingInfo.Type === "get" ? BookTarget.SendServiceCheckId : BookTarget.ReturnServiceCheckId, i(f), r(FloatTarget.StoreBoxId)) : (BookingInfo.Type === "get" ? ($.trim($(BookTarget.PickupCityId).attr("value")) === $.trim($(BookTarget.ReturnCityId).attr("value")) ? ($(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).attr("value", BookingInfo.StoreName), $(BookTarget.PickupStoreID + "," + BookTarget.ReturnStoreID).attr("value", n), $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).attr("value", u), $("#pickUpCityId,#returnCityId").attr("value", t)) : ($(BookTarget.PickupStoreNameId).attr("value", BookingInfo.StoreName), $(BookTarget.PickupStoreID).attr("value", n), $("#pickUpCityId").attr("value", t), $(BookTarget.PickupCityId).attr("value", u)), $(BookTarget.DisplayType).attr("value", $(this).attr("type"))) : ($(BookTarget.ReturnStoreNameId).attr("value", BookingInfo.StoreName), $(BookTarget.ReturnStoreID).attr("value", n), $("#returnCityId").attr("value", t), $(BookTarget.ReturnCityId).attr("value", u)), Floating.Source.hide(), c($(this).attr("from_time"), $(this).attr("time"), BookingInfo.Type));
        e = $.trim($(BookTarget.FromDateId).val()) + " " + $.trim($("#getTime").val()) + ":" + $.trim($("#hdnPickUpMinute").val());
        o = $.trim($(BookTarget.ToDateId).val()) + " " + $.trim($("#retTime").val()) + ":" + $.trim($("#hdnReturnMinute").val());
        $("#rentDay").text(dateDiff(e, o))
    });
    $("#ahrUsedStore").live("click", function () {
        if (!$(".mendian-used-list input").hasClass("sel")) return alert("请选择您的常用门店"), !1;
        var n = $(".mendian-used-list input.sel");
        $(BookTarget.PickupStoreID).attr("value", n.attr("pid"));
        $(BookTarget.ReturnStoreID).attr("value", n.attr("rid"));
        $(BookTarget.PickupStoreNameId).attr("value", n.attr("pna"));
        $(BookTarget.ReturnStoreNameId).attr("value", n.attr("rna"));
        $(BookTarget.PickupCityId).attr("value", n.attr("pcn"));
        $(BookTarget.ReturnCityId).attr("value", n.attr("rcn"));
        $(".myshowbox-container .btn-close, #bgScreen").trigger("click")
    });
    $("#usedStoreShowBox").live("click", function () {
        myshowBox("", "", "600", "260", "false", "");
        $(".div-myshowbox").wrapInner($("#mendian-popup").html())
    });
    $(".mendian-used-list input").live("click", function () {
        $(this).addClass("sel").parent().siblings().find("input").removeClass("sel")
    });
    var f = function (n) {
        $(FloatTarget.StoreBoxId).html(n);
        BookingInfo.StoreName.indexOf("营业门店") > -1 && (BookingInfo.StoreName = $(FloatTarget.StoreBoxTarget.StoreContentSpan).eq(0).text().replace(/\n/g, ""));
        h(BookingInfo.StoreName)
    }, h = function (t) {
        var u = $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(0).find("span[rel='" + t + "']").text(),
            i = $(FloatTarget.StoreBoxTarget.StoreContentLi).find(" span[rel='" + t + "']").parents(FloatTarget.StoreBoxTarget.StoreContentLi).index(),
            r;
        $(FloatTarget.StoreBoxTarget.StoreContentLi).find(" span[rel='" + t + "']").addClass("hover").siblings().removeClass("hover");
        u !== "" && (i = -1);
        r = null;
        i === -1 ? ($(FloatTarget.StoreBoxTarget.StoreTabLi).eq(0).addClass("current"), $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(0).addClass("current"), r = u != "" ? $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(0).find("span[rel='" + t + "']") : $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(0).find(".dl-mendian dd span").eq(0).addClass("hover")) : ($(FloatTarget.StoreBoxTarget.StoreTabLi).eq(i).addClass("current").siblings().removeClass("current"), $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(i).addClass("current").show().siblings().hide(), r = $(FloatTarget.StoreBoxTarget.StoreContentLi).find("span[rel='" + t + "']"));
        n(r)
    }, n = function (n) {
        var f = n.attr("add"), e = n.attr("from_time"), o = n.attr("time"), s = n.attr("sid"),
            h = $(BookTarget.PickupCityId).attr("value"), c = $(BookTarget.ReturnCityId).attr("value"),
            l = BookingInfo.Type === "get" ? h : c, a = n.attr("p"), i = n.attr("air"),
            t = $(FloatTarget.StoreBoxTarget.StoreMap).attr("href"), r = t, u;
        t != undefined && t.indexOf("?") > 0 && (r = t.substring(0, t.indexOf("?")));
        u = r + "?sid=" + s + "&c=" + escape(l);
        $(FloatTarget.StoreBoxTarget.StoreAdd).text(f);
        $(FloatTarget.StoreBoxTarget.StoreTime).find(".allDay").remove();
        n.has(".allhour").length > 0 ? ($(FloatTarget.StoreBoxTarget.StoreTime).append("<span class='allDay'>24小时营业<\/span>"), $(FloatTarget.StoreBoxTarget.StoreTime).find(".time").hide()) : ($(FloatTarget.StoreBoxTarget.StoreTime + " .get-hour").text(e), $(FloatTarget.StoreBoxTarget.StoreTime + " .ret-hour").text(o), $(FloatTarget.StoreBoxTarget.StoreTime).find(".time").show());
        $(FloatTarget.StoreBoxTarget.StoreMap).attr("href", u);
        $(FloatTarget.StoreBoxTarget.StorePhoneNumber).text(a);
        FloatTarget.IsFreeSendService(n.attr("rel"), "免费") ? $(FloatTarget.StoreBoxTarget.StoreDetail).hide() : $(FloatTarget.StoreBoxTarget.StoreDetail).show();
        i != undefined && i.length > 0 ? $("#jsj").show().text(i) : $("#jsj").hide()
    }, c = function (n, t, i) {
        var e = parseInt(t), u = parseInt(n), h = (new Date).getHours(),
            o = parseInt($(BookTarget.FromTimeId).text().replace("时", "")),
            s = parseInt($(BookTarget.ToTimeId).text().replace("时", "")), r = o, f = s;
        (u >= o || h <= u) && (r = u);
        (u >= s || h <= u) && (f = u);
        e <= o && (r = e);
        e <= s && (f = e);
        i === "get" ? ($(BookTarget.PickupHourID + "," + BookTarget.ReturnHourID).attr("value", r), $(BookTarget.FromTimeId).text((r < 10 ? "0" : "") + r + "时"), $(BookTarget.ToTimeId).text((r < 10 ? "0" : "") + r + "时")) : ($(BookTarget.ReturnHourID).attr("value", f), $(BookTarget.ToTimeId).text((f < 10 ? "0" : "") + f + "时"))
    };
    $(BookTarget.SendServiceCheckId + "," + BookTarget.ReturnServiceCheckId).click(function () {
        initializeObj($(this).attr("id"), null, "getCheck");
        $("#SearchStore").val("");
        $(this).attr("checked") && e();
        i(this)
    });
    $(".send-close").click(function () {
        $("#shcMapBox").addClass("hidden")
    });
    i = function (n) {
        var u = $(BookTarget.SendServiceCheckId).attr("checked"),
            f = $(BookTarget.ReturnServiceCheckId).attr("checked"), i, r;
        t(u, f);
        $(BookTarget.SameReturnAddress).find("input").attr("checked", !1);
        initializeObj($(n).attr("id"), null, "getCheck");
        i = BookingInfo.Type === "get";
        r = i ? "#txtGetCarAddress" : "#txtDropCarAddress";
        $(n).attr("checked") ? (i ? $(BookTarget.PickupStoreNameId).hide() : $(BookTarget.ReturnStoreNameId).hide(), $(r).show()) : (i ? $(BookTarget.PickupStoreNameId).show() : $(BookTarget.ReturnStoreNameId).show(), $(r).hide())
    };
    $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).click(function () {
        var t, i, r, u, f, o, n;
        if ($("#SearchStore").val(""), $("#shcMapBox").removeClass("hidden"), initializeObj($(this).attr("id"), $(FloatTarget.SendBoxId), "txtGetCarAddress"), t = BookingInfo.Type === "get" ? "送车上门" : "上门取车", $(FloatTarget.ServiceTarger.Address).val("请输入您的" + t + "地址"), i = BookingInfo.Type === "get" ? $("#getAddress").val() : $("#retAddress").val(), i === "") return e(), !1;
        SetMapIcon();
        BookingInfo.Type === "get" ? (r = $("#getlat").val(), u = $("#getlng").val(), MapCommon.func.GetAddress(u, r)) : (f = $("#retlat").val(), o = $("#retlng").val(), MapCommon.func.GetAddress(o, f));
        n = BookingInfo.Type === "get" ? BookingInfo.SendCarHtml : BookingInfo.TakeCarHtml;
        n === undefined ? ($("#inside").hide(), $("#outside").show()) : ($("#inside").show(), $("#outside").hide(), $("#addresslist").html(n))
    });
    o = function (n) {
        $(FloatTarget.SendBoxId).remove();
        $(FloatTarget.StoreBoxId).after(n)
    };
    $(FloatTarget.ServiceTarger.ListCityLi).live("click", function () {
        var n = $.trim($(this).text()), t, i;
        $(FloatTarget.ServiceTarger.RightSelectArea).parent().hide();
        n === "上海" && $(FloatTarget.ServiceTarger.RightSelectArea).parent().show();
        $(this).addClass("selected").siblings().removeClass("selected");
        t = "city=" + escape(n);
        i = BookingInfo.Type === "get" ? "送车上门" : "上门取车";
        $(FloatTarget.ServiceTarger.LeftInput + "," + FloatTarget.ServiceTarger.RightInput).val("请选择");
        $(FloatTarget.ServiceTarger.Address).val("请输入您的" + i + "地址");
        BookingAjax.ReqService(BookingAjax.Url.ServicePath, t, FloatTarget.ServiceTarger.LeftSelectType, "SendAndReturnCity")
    });
    $(FloatTarget.ServiceTarger.LeftInput + ",.shc-form .select-type #selectType").live("click", function () {
        $(this).parents(".shc-form .select-type").addClass("current");
        Floating.IsShow(BookingInfo.Type, FloatTarget.ServiceTarger.LeftInput, FloatTarget.ServiceTarger.LeftSelectType)
    });
    $(FloatTarget.ServiceTarger.RightInput + ",.shc-form .select-area #selectArea").live("click", function () {
        Floating.IsShow(BookingInfo.Type, FloatTarget.ServiceTarger.RightInput, FloatTarget.ServiceTarger.RightSelectArea)
    });
    $(FloatTarget.ServiceTarger.LeftSelectType + " .type-list li").live("click", function () {
        var n = $(this).text();
        n.indexOf("免费") > -1 ? r(FloatTarget.SendBoxId) : ($(FloatTarget.ServiceTarger.LeftInput).attr("value", n), $(FloatTarget.ServiceTarger.ServicePrice).text($(this).attr("rel")), $(FloatTarget.ServiceTarger.SelectBox).parent().removeClass("current"), $(FloatTarget.ServiceTarger.LeftSelectType).hide())
    });
    r = function (n) {
        var t;
        BookingAjax.ReqService(BookingAjax.Url.FreeServiceRoadPath, "", FloatTarget.FreeId, "FreeService");
        t = BookingInfo.Type === "get" ? $(BookTarget.SendServiceId) : $(BookTarget.ReturnServiceId);
        $(FloatTarget.ServiceTarger.SelectBox).hide();
        $(n).hide();
        Floating.IsShow(BookingInfo.Type, t, FloatTarget.FreeId);
        Floating.Source = $(FloatTarget.FreeId)
    };
    $(FloatTarget.ServiceTarger.RightSelectArea + " .type-list li").live("click", function () {
        $(FloatTarget.ServiceTarger.RightInput).attr("value", $(this).text());
        $(FloatTarget.ServiceTarger.RightSelectArea).hide()
    });
    $(FloatTarget.ServiceTarger.ServiceSelectShowBoxLi).live("mouseover", function () {
        $(this).addClass("current")
    }).live("mouseout", function () {
        $(this).removeClass("current")
    });
    $(FloatTarget.ServiceTarger.Address).live("click", function () {
        $(this).attr("value").indexOf("输入您的") > -1 && $(this).attr("value", "")
    }).live("blur", function () {
        var n = BookingInfo.Type === "get" ? "送车上门" : "上门取车";
        $(this).attr("value") === "" && $(this).attr("value", "请输入您的" + n + "地址")
    });
    $(".shc-form .op-box .btn-save").live("click", function () {
        var i = $(".shc-box .list-city li.selected").text(), f = BookingInfo.Type === "get" ? "送车上门" : "上门取车",
            e = $(FloatTarget.ServiceTarger.LeftInput).attr("value").replace(/^\s+|\s+$/g, ""),
            n = $(FloatTarget.ServiceTarger.Address).attr("value").replace(/^\s+|\s+$/g, ""), r = i + n, u;
        if (e.indexOf("请选择") > -1) return alert("请选择区域");
        if (n.indexOf("请输入") > -1 || $.trim(n).length === 0) return alert("请输入您的" + f + "地址");
        if (n.indexOf("#") > -1 || n.indexOf("-") > -1) return alert("您输入的地址中包含特殊字符");
        BookingInfo.Type == "get" ? ($(BookTarget.SendServiceId).attr("value", r), u = $(BookTarget.SameReturnAddress).find("input").attr("checked"), u && ($(BookTarget.ReturnServiceCheckId).attr("checked", !0), $(BookTarget.ReturnServiceId).attr("value", r), $(".mendianGet").eq(1).hide(), $("#retcitybox").hide(), $(".wnh").eq(1).show(), $(BookTarget.ReturnCityId).attr("value", i), t(!0, !0))) : $(BookTarget.ReturnServiceId).attr("value", r);
        BookingInfo.Type === "get" ? $(BookTarget.PickupCityId).attr("value", i) : $(BookTarget.ReturnCityId).attr("value", i);
        Floating.Source.hide()
    });
    $(document).delegate(FloatTarget.FreeRoad.Roadspan + "," + FloatTarget.FreeRoad.Community + "," + FloatTarget.SelectTime + " li," + FloatTarget.TimeSelectMinute + " li", "mouseover mouseout", function (n) {
        n.type !== "mouseover" || $(this).hasClass("disable") ? $(this).removeClass("on") : $(this).addClass("on")
    });
    $(document).delegate(FloatTarget.FreeRoad.Roadspan, "click", function () {
        var t = "road=" + escape($(this).attr("rel")), n;
        BookingAjax.ReqService(BookingAjax.Url.FreeServiceDistrictPath, t, FloatTarget.FreeRoad.CommunityId, "FreeServiceRoad");
        n = BookingInfo.Type === "get" ? BookTarget.SendServiceId : BookTarget.ReturnServiceId;
        $(FloatTarget.FreeRoad.CommunityId).show();
        Floating.IsShow(BookingInfo.Type, n, FloatTarget.FreeId);
        $(" .free .road").hide()
    });
    $(document).delegate(FloatTarget.FreeRoad.Community, "click", function () {
        var t = BookingInfo.Type === "get" ? BookTarget.SendServiceId : BookTarget.ReturnServiceId,
            n = $(this).attr("id");
        BookingInfo.Type === "get" ? $(BookTarget.PickUpFreeServicePointId).attr("value", n) : $(BookTarget.ReturnFreeServicePointId).attr("value", n);
        var i = $(this).attr("city").replace(/^\s+|\s+$/g, ""), r = $(this).attr("area").replace(/^\s+|\s+$/g, ""),
            u = $(this).find("address").text().replace(/^\s+|\s+$/g, "");
        $(t).attr("value", i + "-" + r + "-" + u);
        $(FloatTarget.FreeRoad.CommunityId).hide();
        $(FloatTarget.FreeId).hide()
    });
    $(FloatTarget.FreeRoad.Back).live("click", function () {
        var n, t;
        $(FloatTarget.FreeId).hide();
        n = BookingInfo.Type === "get" ? BookTarget.SendServiceId : BookTarget.ReturnServiceId;
        BookingAjax.ReqStore(BookingAjax.Url.ServicePath, "SendAndReturnService", "SendAndReturnService", o);
        Floating.IsShow(BookingInfo.Type, n, FloatTarget.SendBoxId);
        Floating.Source = $(FloatTarget.SendBoxId);
        t = BookingInfo.Type === "get" ? "送车上门" : "上门取车";
        $(FloatTarget.ServiceTarger.LeftInput + "," + FloatTarget.ServiceTarger.RightInput).val("请选择");
        $(FloatTarget.ServiceTarger.Address).val("请输入您的" + t + "地址")
    });
    $("#book_StartCldDate_gethour,#book_EndCldDate_rethour").live("click", function () {
        var t;
        initializeObj($(this).attr("id"), $(FloatTarget.SelectTime), "gethour");
        Floating.IsShow(BookingInfo.Type, this, FloatTarget.SelectTime);
        var n = BookingInfo.Type === "get" ? $(BookTarget.PickupStoreID).attr("value") : $(BookTarget.ReturnStoreID).attr("value"),
            i = BookingInfo.Type === "get" ? $.trim($(BookTarget.FromDateId).val()) : $.trim($(BookTarget.ToDateId).val()),
            r = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val();
        BookingInfo.Type === "get" ? $("#getCheck").attr("checked") && (n = 0) : $("#retCheck").attr("checked") && (n = 0);
        t = "id=" + n + "&pickupDateTime=" + i + "&cityId=" + r + "&ism=false";
        $(FloatTarget.SelectTime).html("");
        BookingAjax.ReqService(BookingAjax.Url.StoreTimePath, t, FloatTarget.SelectTime, "SelectedTime");
        var f = u().split("-"), e = parseInt(f[1]), o = parseInt(document.documentElement.scrollTop),
            s = parseInt($(this).position().top);
        e - s + o < $(".timeselect").height() ? $(".timeselect").addClass("posbot") : $(".timeselect").removeClass("posbot")
    });
    $("#book_StartCldDate_getminute,#book_EndCldDate_retminute").live("click", function () {
        initializeObj($(this).attr("id"), $(FloatTarget.TimeSelectMinute), "getminute");
        Floating.IsShow(BookingInfo.Type, this, FloatTarget.TimeSelectMinute);
        var n = BookingInfo.Type === "get" ? $(BookTarget.PickupStoreID).attr("value") : $(BookTarget.ReturnStoreID).attr("value"),
            t = $(BookTarget.FromDateId).val() + " " + $(BookTarget.PickupHourID).val() + ":00",
            i = $(BookTarget.ToDateId).val() + " " + $(BookTarget.ReturnHourID).val() + ":00",
            r = BookingInfo.Type === "get" ? t : i,
            f = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(),
            e = "id=" + n + "&pickupDateTime=" + r + "&cityId=" + f + "&ism=true";
        $(FloatTarget.SelectTime).html("");
        BookingAjax.ReqService(BookingAjax.Url.StoreTimePath, e, FloatTarget.TimeSelectMinute, "SelectedTime");
        var o = u().split("-"), s = parseInt(o[1]), h = parseInt(document.documentElement.scrollTop),
            c = parseInt($(this).position().top);
        s - c + h < $(".timeselect").height() ? $(".timeselect").addClass("posbot") : $(".timeselect").removeClass("posbot")
    });
    u = function () {
        var n = 0, t = 0;
        return window.innerWidth ? n = window.innerWidth : document.body && document.body.clientWidth && (n = document.body.clientWidth), window.innerHeight ? t = window.innerHeight : document.body && document.body.clientHeight && (t = document.body.clientHeight), document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth && (t = document.documentElement.clientHeight, n = document.documentElement.clientWidth), n + "-" + t
    };
    $(document).delegate(FloatTarget.SelectTime + " .t", "click", function () {
        var n = $(this), t = n.text(), i = $.trim($(BookTarget.PickupStoreNameId).attr("value")),
            r = $.trim($(BookTarget.ReturnStoreNameId).attr("value"));
        BookingInfo.Type === "get" ? i === r ? ($(BookTarget.FromTimeId + "," + BookTarget.ToTimeId).text(t), $(BookTarget.PickupHourID + "," + BookTarget.ReturnHourID).attr("value", n.attr("rel"))) : ($(BookTarget.PickupHourID).attr("value", n.attr("rel")), $(BookTarget.FromTimeId).text(t)) : ($(BookTarget.ReturnHourID).attr("value", n.attr("rel")), $(BookTarget.ToTimeId).text(t));
        Floating.Source.hide()
    });
    $(document).delegate(FloatTarget.TimeSelectMinute + " .t", "click", function () {
        var n = $(this), t = n.text(), i = $.trim($(BookTarget.PickupStoreNameId).attr("value")),
            r = $.trim($(BookTarget.ReturnStoreNameId).attr("value"));
        BookingInfo.Type === "get" ? i === r ? ($("#book_StartCldDate_lblgetCurrMinute,#book_EndCldDate_lblretCurrminute").text(t), $("#hdnPickUpMinute,#hdnReturnMinute").attr("value", n.attr("rel"))) : ($("#hdnPickUpMinute").attr("value", n.attr("rel")), $("#book_StartCldDate_lblgetCurrMinute").text(t)) : ($("#hdnReturnMinute").attr("value", n.attr("rel")), $("#book_EndCldDate_lblretCurrminute").text(t));
        Floating.Source.hide()
    });
    $(FloatTarget.StoreBoxId).delegate(".store-inquire .iqst-all", "click", function () {
        var i = BookingInfo.Type === "get" ? "Store" : "ReturnStore", e = $(this).attr("id").toLowerCase(),
            o = BookingInfo.Type === "get" ? $(BookTarget.PickupCityId).attr("value") : $(BookTarget.ReturnCityId).attr("value"),
            s = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(), r, t, u;
        $("#city").text(o);
        u = BookingInfo.Type === "get";
        t = s + "&isPickupService=" + u;
        e.indexOf("allstore") > -1 ? ($("#setAllStore").show().siblings().hide(), $(".businessDistrict").removeClass("current").hide(), $("#setNearStore").hide().siblings().show(), r = BookingAjax.Url.StorePath, $(FloatTarget.StoreBoxId).html(""), BookingAjax.ReqStore(r, t, i, f), $("#setAllStore").show().siblings().hide(), $(".businessDistrict").removeClass("current").hide(), $("#allStore").addClass("iqst-current").siblings().removeClass("iqst-current"), $("#ydkBox .inf-box").show()) : e.indexOf("nearstore") > -1 ? ($("#nearStore").addClass("iqst-current").siblings().removeClass("iqst-current"), $("#setNearStore").show().siblings().hide(), $("#setNearStoreLi").show(), $("#txtAddress").focus(), $("#ydkBox .list-mendian,#ydkBox .inf-box,#ydkBox .check-address span").hide()) : e.indexOf("hotspots") > -1 ? ($("#setHotSpots").show().siblings().hide(), $("#setHotSpots li").eq(0).addClass("current"), $("#hotSpots").addClass("iqst-current").siblings().removeClass("iqst-current"), t = $("#setHotSpots").find("li").eq(0).data("param"), $(FloatTarget.StoreBoxId).find(".tabHF-content.list-mendian").html(""), i = u ? "SportStore" : "ReturnSportStore", BookingAjax.ReqStore(BookingAjax.Url.SpotPath + "spot&isPickupService=" + u + "&spot=", t, i, function (t) {
            if ($.trim(t) === "") $(FloatTarget.StoreBoxId).find(".inf-box").hide(), $(FloatTarget.StoreBoxId).find(".tabHF-content.list-mendian").html("<div class='list-none'>附近未查到相关门店信息<\/div>"); else {
                $("#ydkBox .list-mendian,#ydkBox .inf-box").show();
                $("#ydkBox .list-mendian").html("").html(t);
                $("#ydkBox .check-address span").hide();
                var i = $(FloatTarget.StoreBoxTarget.StoreContentSpan).eq(0).addClass("hover");
                n(i)
            }
        })) : (r = BookingAjax.Url.StorePath, $(FloatTarget.StoreBoxId).html(""), BookingAjax.ReqStore(r, t, i, function (t) {
            $(FloatTarget.StoreBoxId).html(t);
            $("#setBusinessDistrict").show().siblings().hide();
            $("#setBusinessDistrict li").eq(0).addClass("current");
            $("#ydkBox .list-mendian").show();
            $(".businessDistrict").eq(0).show().siblings().removeClass("current").hide();
            var i = $(".businessDistrict dl dd").eq(0).find("span").addClass("hover");
            n(i);
            $("#businessDistrict").addClass("iqst-current").siblings().removeClass("iqst-current")
        }))
    });
    $(document).on("click", "#setHotSpots li", function () {
        var r = $(this).data("param"), t, i;
        $(this).addClass("current").siblings().removeClass("current");
        t = BookingInfo.Type === "get";
        i = t ? "SportStore" : "ReturnSportStore";
        BookingAjax.ReqStore(BookingAjax.Url.SpotPath + "spot&isPickupService=" + t + "&spot=", r, i, function (t) {
            if ($.trim(t) === "") $(FloatTarget.StoreBoxId).find(".inf-box").hide(), $("#ydkBox .list-mendian").html("<div class='list-none'>附近未查到相关门店信息<div>").show(); else {
                $("#ydkBox .list-mendian,#ydkBox .inf-box").show();
                $("#ydkBox .list-mendian").html("").html(t);
                $("#ydkBox .check-address span").hide();
                var i = $(FloatTarget.StoreBoxTarget.StoreContentSpan).eq(0).addClass("hover");
                n(i)
            }
        })
    });
    $(document).delegate(FloatTarget.TabHF.tabTitleLi, "mouseover mouseout", function (t) {
        if (t.type === "mouseover") {
            var i = $(this), r = i.index();

            function u() {
                var f, u, e;
                if ($("#businessDistrict").hasClass("iqst-current")) f = r + $("#setAllStore li").size(), i.parent().parent().parent().addClass("curbox"), i.addClass("current").siblings(".curbox " + FloatTarget.TabHF.tabTitleLi).removeClass("current"), $(".curbox " + FloatTarget.TabHF.tabContentLi).eq(f).addClass("current").siblings().removeClass("current"), $(".curbox " + FloatTarget.TabHF.tabContentLi).eq(f).find("dd").eq(0).find("span").addClass("hover"), $(".curbox " + FloatTarget.TabHF.tabContentLi).eq(f).show().siblings(".curbox " + FloatTarget.TabHF.tabContentLi).hide(), i.parent().parent().parent().removeClass("curbox"), u = $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(f).find("span").eq(0).addClass("hover"), n(u); else {
                    if ($("#hotSpots").hasClass("iqst-current")) return;
                    i.parent().parent().parent().addClass("curbox");
                    i.addClass("current").siblings(".curbox " + FloatTarget.TabHF.tabTitleLi).removeClass("current");
                    $(".curbox " + FloatTarget.TabHF.tabContentLi).eq(r).addClass("current").siblings(".curbox " + FloatTarget.TabHF.tabContentLi).removeClass("current");
                    $(".curbox " + FloatTarget.TabHF.tabContentLi).eq(r).show().siblings(".curbox " + FloatTarget.TabHF.tabContentLi).hide();
                    i.parent().parent().parent().removeClass("curbox");
                    $(t.target).parent().hasClass("list-area") && (u = null, $(FloatTarget.StoreBoxTarget.StoreContentSpan).removeClass("hover"), e = $.trim($(FloatTarget.StoreBoxTarget.StoreContentLi).eq(r).find("span[rel='" + BookingInfo.StoreName + "']").text()), e !== "" ? (u = $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(r).find("span[rel='" + e + "']"), $(FloatTarget.StoreBoxTarget.StoreContentSpan + "[rel='" + e + "']").addClass("hover")) : u = $(FloatTarget.StoreBoxTarget.StoreContentLi).eq(r).find("span").eq(0).addClass("hover"), n(u))
                }
            }

            window.handle = setTimeout(u, 200)
        } else clearTimeout(handle)
    });
    $(FloatTarget.FloatBoxIdList()).live("mouseover", function () {
        Floating.IsMouseOut = !1
    }).live("mouseout", function () {
        Floating.IsMouseOut = !0
    });
    $(FloatTarget.ServiceTarger.SelectBox).live("mouseover", function () {
        Floating.IsServiceMouseOut = !1
    }).live("mouseout", function () {
        Floating.IsServiceMouseOut = !0
    });
    $(document).mousedown(function (n) {
        n = window.e || n;
        var t = n.target || n.srcElement;
        Floating.Target = t;
        Floating.IsServiceMouseOut && ($(FloatTarget.ServiceTarger.SelectBox).hide(), $(FloatTarget.ServiceTarger.SelectBox).parent().removeClass("current"));
        Floating.IsMouseOut && Floating.IsHide && Floating.Source != undefined && ($(".store-inquire span").removeClass("iqst-current"), Floating.Source.hide(), Floating.Source = null)
    });
    $("#btnSubmit").click(function () {
        $(this).hide();
        $(".btn-subload").css("display", "block");
        var n = $("#sidebar *").serializeJson();
        n.txtGetCarAddress = n.txtGetCarAddress.replace("请输入送车上门地址", "");
        n.txtDropCarAddress = n.txtDropCarAddress.replace("请输入上门取车地址", "");
        delete n.book$CldDate$gettime;
        delete n.book$CldDate$rettime;
        delete n.type;
        $.post(BookingAjax.Url.IndexAjax + "?v=" + (new Date).getUTCMilliseconds(), n, function (data) {
            var obj = eval("(" + data + ")");
            return obj.isSuccess ? ($("#sub").html(obj.msg), !0) : ($("#btnSubmit").show(), $(".btn-subload").css("display", "none"), alert(obj.msg), !1)
        })
    });
    $("#RequirementSubmit").live("click", function () {
        var n = "Name=" + escape($("#Name").val()) + "&MobilePhoneNo=" + $("#MobilePhoneNo").val() + "&Days=" + $("#Days").attr("v");
        $("#error").text("");
        BookingAjax.ReqSubmit(window.PostRequirement + n, function (n) {
            return n = n.replace(/"/g, ""), n !== "000000" ? $("#error").text(n) : $(".myshowbox-container .btn-close").trigger("click"), !1
        })
    });
    l();
    $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).keyup(function (n) {
        var t;
        if (Floating.Source && Floating.Source.hide(), n.keyCode != 9) {
            if (t = "#" + $(this).attr("id"), initializeObj(t, $(FloatTarget.CityAutoBoxId), "getCarCity"), Floating.IsShow("get", t, FloatTarget.CityAutoBoxId), n.keyCode == 13) {
                var u = $(".inquire-citybox li.citybox-select").attr("rel"),
                    f = $(".inquire-citybox li.citybox-select").attr("cid"), e = $("#city_get"), r = $("#city_ret"),
                    i = $(".inquire-citybox li.citybox-select").attr("ac") === "Y";
                if (!$.trim($(FloatTarget.CityBoxTarget.CityLi).find("span[rel='" + $(this).val() + "']").text())) return;
                BookingInfo.CityName = u;
                BookingInfo.Type === "get" ? (i ? e.show() : e.hide(), i ? r.show() : r.hide(), i || ($(BookTarget.SendServiceCheckId + "," + BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).show(), $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).hide()), $("#pickUpCityId,#returnCityId").attr("value", f), $("#getlng,#getlat,#retlng,#retlat,#getAddress,#retAddress").val(""), $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).attr("value", u), $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).val(""), $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).val(""), $(BookTarget.PickupStoreNameId).attr("placeholder", "请选择取车营业门店"), $(BookTarget.ReturnStoreNameId).attr("placeholder", "请选择还车营业门店"), $(BookTarget.SendServiceId).attr("placeholder", "请输入送车上门地址"), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址")) : (i ? r.show() : r.hide(), i || ($(BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.ReturnStoreNameId).show(), $(BookTarget.ReturnServiceId).hide()), $("#returnCityId").attr("value", f), $("#retlng,#retlat,#retAddress").val(""), $(BookTarget.ReturnCityId).attr("value", u), $(BookTarget.ReturnStoreNameId).val(""), $(BookTarget.ReturnServiceId).val(""), $(BookTarget.ReturnStoreNameId).attr("placeholder", "请选择还车营业门店"), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址"));
                Floating.Source.hide()
            }
            $.trim($(this).attr("value")) === "" && (Floating.Source.hide(), initializeObj(t, $(FloatTarget.CityBoxId), "getCarCity"), Floating.IsShow("get", t, FloatTarget.CityBoxId))
        }
    });
    $(".inquire-citybox li").live("click", function () {
        var i = $(this), r = i.attr("rel"), u = $("#city_get"), t = $("#city_ret"), n = i.attr("ac") === "Y",
            f = i.attr("cid");
        BookingInfo.CityName = r;
        BookingInfo.Type === "get" ? ($("#pickUpCityId,#returnCityId").attr("value", f), n ? u.show() : u.hide(), n ? t.show() : t.hide(), n || ($(BookTarget.SendServiceCheckId + "," + BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.PickupStoreNameId + "," + BookTarget.ReturnStoreNameId).show(), $(BookTarget.SendServiceId + "," + BookTarget.ReturnServiceId).hide()), $("#getlng,#getlat,#retlng,#retlat,#getAddress,#retAddress").val(""), $(BookTarget.SendServiceId).attr("placeholder", "请输入送车上门地址"), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址"), $(BookTarget.PickupCityId + "," + BookTarget.ReturnCityId).attr("value", r), $(BookTarget.PickupStoreNameId).val("").attr("placeholder", "请选择取车营业门店"), $(BookTarget.ReturnStoreNameId).val("").attr("placeholder", "请选择还车营业门店")) : (n ? t.show() : t.hide(), n || ($(BookTarget.ReturnServiceCheckId).attr("checked", !1), $(BookTarget.ReturnStoreNameId).show(), $(BookTarget.ReturnServiceId).hide()), $("#retlng,#retlat,#retAddress").val(""), $("#returnCityId").attr("value", f), $(BookTarget.ReturnServiceId).attr("placeholder", "请输入上门取车地址"), $(BookTarget.ReturnCityId).attr("value", r), $(BookTarget.ReturnStoreNameId).val("").attr("placeholder", "请选择还车营业门店"));
        $(FloatTarget.CityAutoBoxId).hide()
    });
    $(document).on("keyup", "#txtAddress", function (n) {
        var t, u;
        if (n.keyCode > 36 && n.keyCode < 41 || n.keyCode === 13) return !1;
        t = $("#NearSearch");
        t.html("");
        var i = $("#txtAddress"), f = i.position().top, e = i.position().left;
        t.css({top: f + 29 + "px", left: e + "px"}).show();
        var s = BookingInfo.Type === "get" ? $(BookTarget.PickupCityId).attr("value") : $(BookTarget.ReturnCityId).attr("value"),
            o = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(), r = i.val();
        if (r.length < 3) return !1;
        u = "&cityId=" + o + "&address=" + escape(r);
        setTimeout(function () {
            BookingAjax.ReqStore(BookingAjax.Url.SearchNearAddress, u, "searchNearAddress", function (n) {
                t.html(n)
            })
        }, 200)
    });
    $(document).on("click", ".nearsearch-list li", function () {
        var i = $(this).data("lat"), r = $(this).data("lng"), u = $(this).data("address");
        $("#txtAddress").val(u);
        var f = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val(),
            t = BookingInfo.Type === "get", e = f + "&lat=" + i + "&lng=" + r + "&isPickupService=" + t,
            o = t ? "NearStore" : "ReturnNearStore";
        BookingAjax.ReqStore(BookingAjax.Url.StorePath, e, o, function (t) {
            $("#NearSearch").hide();
            $.trim(t) === "" ? $("#ydkBox .check-address span").text("未查到相关信息，请检查地址文字是否输入正确，重新再试。").show() : ($("#ydkBox .list-mendian,#ydkBox .inf-box").show(), $("#ydkBox .list-mendian").html("").html(t), $("#ydkBox .check-address span").hide(), storeObj = $(FloatTarget.StoreBoxTarget.StoreContentSpan).eq(0).addClass("hover"), n(storeObj))
        })
    })
});
$(function () {
    function n(n, t, i, r, u) {
        var e = u, o = $(n), s, f;
        o.removeClass(i);
        e.addClass(i);
        s = o.index(e);
        f = $(t);
        f.addClass(r).hide();
        f.eq(s).removeClass(r).show()
    }

    $("#long_rental .title-top span").click(function () {
        n("#long_rental .title-top span", "#long_rental .form-box", "current", "noopcity", $(this))
    });
    $("#long_rental .title-top span").eq(0).trigger("click")
});
$(function () {
    var n = function () {
        var n = $.trim($(BookTarget.FromDateId).val()) + " " + $.trim($("#getTime").val()) + ":" + $.trim($("#hdnPickUpMinute").val()),
            t = $.trim($(BookTarget.ToDateId).val()) + " " + $.trim($("#retTime").val()) + ":" + $.trim($("#hdnReturnMinute").val());
        $("#rentDay").text(dateDiff(n, t))
    }();
    $(".timeselect li").live("click", function () {
        var n = $.trim($(BookTarget.FromDateId).val()) + " " + $.trim($("#getTime").val()) + ":" + $.trim($("#hdnPickUpMinute").val()),
            t = $.trim($(BookTarget.ToDateId).val()) + " " + $.trim($("#retTime").val()) + ":" + $.trim($("#hdnReturnMinute").val());
        $("#rentDay").text(dateDiff(n, t))
    })
});
$(document).ready(function () {
    var i = document, r = i.getElementsByTagName("input"), e = "placeholder" in i.createElement("input"),
        o = function (n) {
            var t = n.getAttribute("placeholder"), i = n.defaultValue;
            i === "" && (n.value = t);
            n.onfocus = function () {
                n.value === t && (this.value = "")
            };
            n.onblur = function () {
                n.value === "" && (this.value = t)
            }
        }, n, u, t, f;
    if (!e) for (n = 0, u = r.length; n < u; n++) t = r[n], f = t.getAttribute("placeholder"), t.type === "text" && f && o(t)
});
$(function () {
    function n(n, t, i) {
        $(document).delegate("." + n + " > li", "click", function () {
            $(this).addClass(i).siblings().removeClass(i);
            var r = $("." + n + " > li").index(this);
            $("." + t + " > div").eq(r).show().siblings().hide()
        })
    }

    n("city-main", "city-maindt", "main-cur");
    $(document).delegate(".city-hot li,.city-li dd span", "click", function () {
        var n = $(this).attr("title"), t = $(this).data("nameen"), i = $(this).data("id");
        BookingInfo.Type === "get" ? ($("#getGjPickcity,#retGjPickcity").val(n + " - " + t), $("#GjCityId,#returnGjCityId").val(i)) : ($("#retGjPickcity").val(n + " - " + t), $("#returnGjCityId").val(i));
        $("#gjCity").hide()
    });
    $("#book_gjStartCldDate_gethour,#book_gjEndCldDate_rethour").click(function () {
        initializeObj($(this).attr("id"), $("#gjtimeselect"), "book_gjStartCldDate_gethour");
        Floating.InternationalIsShow(BookingInfo.Type, this, "#gjtimeselect")
    });
    $(document).delegate("#gjtimeselect li", "click", function () {
        var n = $(this).attr("rel"), t = $(this).attr("t");
        BookingInfo.Type === "get" ? ($("#book_gjStartCldDate_gethour").text(n), $("#gjTime").val(t)) : ($("#book_gjEndCldDate_rethour").text(n), $("#gjReturntime").val(t));
        $("#gjtimeselect").hide()
    });
    $("#getGjPickcity,#retGjPickcity").click(function () {
        initializeObj($(this).attr("id"), $("#gjCity"), "getGjPickcity");
        Floating.InternationalIsShow(BookingInfo.Type, this, "#gjCity");
        BookingAjax.ReqStore(window.InternationalPath, "", "InternationalCity", function (n) {
            $("#gjCity").html(n)
        })
    });
    $("#btnGj").click(function () {
        var n = $("#gjydk *").serializeJson();
        $.post(BookingAjax.Url.IndexAjax + "?t=gj&v=" + (new Date).getUTCMilliseconds(), n, function (data) {
            var obj = eval("(" + data + ")");
            return obj.isSuccess ? ($("#sub").html(obj.msg), !0) : ($("#btnGj").show(), $(".btn-subload").css("display", "none"), alert(obj.msg), !1)
        })
    })
});
window.MapCommon || (MapCommon = window.MapCommon = {}), function (n, t, i, r) {
    MapCommon.Parameter = {
        initialLat: 0,
        initialLng: 0,
        MapDivId: "",
        MapZoomLevel: 16,
        MapPolygonData: "",
        MarkerIcon: "",
        ImgWidth: 47,
        ImgHight: 47,
        OutFun: function () {
        },
        InFun: function () {
        }
    };
    MapCommon.func = {
        MapLoad: function () {
            n = new BMap.Map(MapCommon.Parameter.MapDivId);
            n.clearOverlays();
            var r = new BMap.Point(MapCommon.Parameter.initialLng, MapCommon.Parameter.initialLat);
            MapCommon.Parameter.MarkerIcon != "" && (t = new BMap.Icon(MapCommon.Parameter.MarkerIcon, new BMap.Size(MapCommon.Parameter.ImgWidth, MapCommon.Parameter.ImgHight)));
            i = new BMap.Marker(r, {icon: t});
            i.enableDragging();
            n.centerAndZoom(r, MapCommon.Parameter.MapZoomLevel);
            n.enableScrollWheelZoom();
            n.enablePinchToZoom();
            n.enableContinuousZoom();
            MapCommon.func.MapPolygon();
            n.addOverlay(i);
            i.addEventListener("dragend", function (n) {
                MapCommon.func.InOrOutPolygon(n.point.lng, n.point.lat, !0)
            });
            n.addEventListener("click", function (n) {
                MapCommon.func.InOrOutPolygon(n.point.lng, n.point.lat, !0)
            })
        }, MapInitLoad: function (i) {
            var o = [], s, r, u, f, h, e;
            for (n = new BMap.Map(MapCommon.Parameter.MapDivId), n.clearOverlays(), MapCommon.Parameter.MarkerIcon != "" && (t = new BMap.Icon(MapCommon.Parameter.MarkerIcon, new BMap.Size(24, 40))), s = ["A", "B", "C", "D"], r = 0; r < i.length; r++) u = new BMap.Point(i[r].lng, i[r].lat), f = new BMap.Marker(u, {icon: t}), n.addOverlay(f), o.push(u), h = "<div><a target='_blank' href='" + window.mapImage.BookingUrl + "?storeId=" + i[r].storeId + "&city=" + i[r].city + "'><span class='mapicon'>" + s[r] + "<\/span><span style='background: #fff; height: 25px; line-height: 25px; display: inline-block; color: #23b7b7; padding: 0 12px 0 18px; margin-top: -4px; margin-left: -3px; border-radius: 0 4px 4px 0; box-shadow: 0 2px 2px #999;'>" + i[r].name + "<\/span><\/a><\/div>", e = new BMap.Label(h, {offset: new BMap.Size(6, 4)}), e.setStyle({
                border: "none",
                color: "#fff",
                fontSize: "14px",
                backgroundColor: "none",
                zIndex: "-1"
            }), f.setLabel(e);
            n.enableScrollWheelZoom();
            n.enablePinchToZoom();
            n.enableContinuousZoom();
            n.setViewport(o)
        }, MapPolygon: function () {
            var e, u, f, o, i, t;
            for (r = [], n.clearOverlays(), e = MapCommon.Parameter.MapPolygonData, u = 0; u < e.length; u++) {
                for (f = e[u], o = [], i = 0; i < f.length; i++) o.push(new BMap.Point(f[i].Lng, f[i].Lat));
                t = new BMap.Polygon(o);
                t.setStrokeColor("#0c95ff");
                t.setStrokeWeight(2);
                t.setFillOpacity(.1);
                t.setFillColor("#0c95ff");
                n.addOverlay(t);
                r.push(t)
            }
        }, IsInPolygon: function (n, t) {
            for (var f = new BMap.Point(n, t), i = !1, u = 0; u < r.length; u++) {
                if (i) break;
                i = BMapLib.GeoUtils.isPointInPolygon(f, r[u])
            }
            return i
        }, InOrOutPolygon: function (t, r, u) {
            var f = new BMap.Point(t, r);
            u && MapCommon.Parameter.InFun(t, r);
            n.centerAndZoom(f, 17);
            i.setPosition(f);
            n.addOverlay(i)
        }, GetPosition: function (t) {
            var r, u = new BMap.LocalSearch(n);
            u.setSearchCompleteCallback(function (t) {
                if (t != undefined) {
                    var u = t.getPoi(0);
                    u != undefined && (n.centerAndZoom(u.point, MapCommon.Parameter.MapZoomLevel), r = new BMap.Point(u.point.lng, u.point.lat), n.centerAndZoom(r, 17), i.setPosition(r), n.addOverlay(i))
                }
            });
            u.search(t)
        }, GetAddress: function (t, r) {
            var u = new BMap.Point(t, r);
            n.centerAndZoom(u, 17);
            i.setPosition(u);
            n.addOverlay(i)
        }
    }
}(), function (n) {
    function r(r, u) {
        var f = this, h = r.add(f), v = n(window), s, e, c, o = n.tools.expose && (u.mask || u.expose),
            l = Math.random().toString().slice(10), a;
        if (o && (typeof o == "string" && (o = {color: o}), o.closeOnClick = o.closeOnEsc = !1), a = u.target || r.attr("rel"), e = a ? n(a) : null || r, !e.length) throw"Could not find Overlay: " + a;
        r && r.index(e) == -1 && r.click(function (n) {
            return f.load(n), n.preventDefault()
        });
        n.extend(f, {
            load: function (r) {
                var a;
                if (f.isOpened()) return f;
                if (a = t[u.effect], !a) throw'Overlay: cannot find effect : "' + u.effect + '"';
                if (u.oneInstance && n.each(i, function () {
                    this.close(r)
                }), r = r || n.Event(), r.type = "onBeforeLoad", h.trigger(r), r.isDefaultPrevented()) return f;
                c = !0;
                o && n(e).expose(o);
                var s = u.top, y = u.left, p = e.outerWidth({margin: !0}), w = e.outerHeight({margin: !0});
                return typeof s == "string" && (s = s == "center" ? Math.max((v.height() - w) / 2, 0) : parseInt(s, 10) / 100 * v.height()), y == "center" && (y = Math.max((v.width() - p) / 2, 0)), a[0].call(f, {
                    top: s,
                    left: y
                }, function () {
                    c && (r.type = "onLoad", h.trigger(r))
                }), o && u.closeOnClick && n.mask.getMask().one("click", f.close), u.closeOnClick && n(document).on("click." + l, function (t) {
                    n(t.target).parents(e).length || f.close(t)
                }), u.closeOnEsc && n(document).on("keydown." + l, function (n) {
                    n.keyCode == 27 && f.close(n)
                }), f
            }, close: function (i) {
                return f.isOpened() ? (i = i || n.Event(), i.type = "onBeforeClose", h.trigger(i), i.isDefaultPrevented() ? void 0 : (c = !1, t[u.effect][1].call(f, function () {
                    i.type = "onClose";
                    h.trigger(i)
                }), n(document).off("click." + l + " keydown." + l), o && n.mask.close(), f)) : f
            }, getOverlay: function () {
                return e
            }, getTrigger: function () {
                return r
            }, getClosers: function () {
                return s
            }, isOpened: function () {
                return c
            }, getConf: function () {
                return u
            }
        });
        n.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function (t, i) {
            n.isFunction(u[i]) && n(f).on(i, u[i]);
            f[i] = function (t) {
                return t && n(f).on(i, t), f
            }
        });
        s = e.find(u.close || ".close");
        !s.length && !u.close && (s = n('<a class="close"><\/a>'), e.prepend(s));
        s.click(function (n) {
            f.close(n)
        });
        u.load && f.load()
    }

    n.tools = n.tools || {version: "v1.2.7"};
    n.tools.overlay = {
        addEffect: function (n, i, r) {
            t[n] = [i, r]
        },
        conf: {
            close: null,
            closeOnClick: !0,
            closeOnEsc: !0,
            closeSpeed: "fast",
            effect: "default",
            fixed: !n.browser.msie || n.browser.version > 6,
            left: "center",
            load: !1,
            mask: null,
            oneInstance: !0,
            speed: "normal",
            target: null,
            top: "10%"
        }
    };
    var i = [], t = {};
    n.tools.overlay.addEffect("default", function (t, i) {
        var r = this.getConf(), u = n(window);
        r.fixed || (t.top += u.scrollTop(), t.left += u.scrollLeft());
        t.position = r.fixed ? "fixed" : "absolute";
        this.getOverlay().css(t).fadeIn(r.speed, i)
    }, function (n) {
        this.getOverlay().fadeOut(this.getConf().closeSpeed, n)
    });
    n.fn.overlay = function (t) {
        var u = this.data("overlay");
        return u ? u : (n.isFunction(t) && (t = {onBeforeLoad: t}), t = n.extend(!0, {}, n.tools.overlay.conf, t), this.each(function () {
            u = new r(n(this), t);
            i.push(u);
            n(this).data("overlay", u)
        }), t.api ? u : this)
    }
}(jQuery), function (n) {
    function r(n) {
        var t = n.offset();
        return {top: t.top + n.height() / 2, left: t.left + n.width() / 2}
    }

    var i = n.tools.overlay, t = n(window), u, f;
    n.extend(i.conf, {start: {top: null, left: null}, fadeInSpeed: "fast", zIndex: 9999});
    u = function (i, u) {
        var f = this.getOverlay(), e = this.getConf(), a = this.getTrigger(), p = this, v = f.outerWidth({margin: !0}),
            o = f.data("img"), y = e.fixed ? "fixed" : "absolute", s, h, c, l;
        if (!o) {
            if (s = f.css("backgroundImage"), !s) throw"background-image CSS property not set for overlay";
            s = s.slice(s.indexOf("(") + 1, s.indexOf(")")).replace(/\"/g, "");
            f.css("backgroundImage", "none");
            o = n('<img src="' + s + '"/>');
            o.css({border: 0, display: "none"}).width(v);
            n("body").append(o);
            f.data("img", o)
        }
        h = e.start.top || Math.round(t.height() / 2);
        c = e.start.left || Math.round(t.width() / 2);
        a && (l = r(a), h = l.top, c = l.left);
        e.fixed ? (h -= t.scrollTop(), c -= t.scrollLeft()) : (i.top += t.scrollTop(), i.left += t.scrollLeft());
        o.css({position: "absolute", top: h, left: c, width: 0, zIndex: e.zIndex}).show();
        i.position = y;
        f.css(i);
        o.animate({top: i.top, left: i.left, width: v}, e.speed, function () {
            f.css("zIndex", e.zIndex + 1).fadeIn(e.fadeInSpeed, function () {
                p.isOpened() && !n(this).index(f) ? u.call() : f.hide()
            })
        }).css("position", y)
    };
    f = function (i) {
        var s = this.getOverlay().hide(), u = this.getConf(), f = this.getTrigger(), e = s.data("img"),
            o = {top: u.start.top, left: u.start.left, width: 0};
        f && n.extend(o, r(f));
        u.fixed && e.css({position: "absolute"}).animate({top: "+=" + t.scrollTop(), left: "+=" + t.scrollLeft()}, 0);
        e.animate(o, u.closeSpeed, i)
    };
    i.addEffect("apple", u, f)
}(jQuery), function (n) {
    function i(t, i) {
        var r = n(i);
        return r.length < 2 ? r : t.parent().find(i)
    }

    function r(r, u) {
        var f = this, v = r.add(f), e = r.children(), l = 0, o = u.vertical, y, p, a, s, h, c;
        t || (t = f);
        e.length > 1 && (e = n(u.items, r));
        u.size > 1 && (u.circular = !1);
        n.extend(f, {
            getConf: function () {
                return u
            }, getIndex: function () {
                return l
            }, getSize: function () {
                return f.getItems().size()
            }, getNaviButtons: function () {
                return s.add(h)
            }, getRoot: function () {
                return r
            }, getItemWrap: function () {
                return e
            }, getItems: function () {
                return e.find(u.item).not("." + u.clonedClass)
            }, move: function (n, t) {
                return f.seekTo(l + n, t)
            }, next: function (n) {
                return f.move(u.size, n)
            }, prev: function (n) {
                return f.move(-u.size, n)
            }, begin: function (n) {
                return f.seekTo(0, n)
            }, end: function (n) {
                return f.seekTo(f.getSize() - 1, n)
            }, focus: function () {
                return t = f, f
            }, addItem: function (t) {
                return t = n(t), u.circular ? (e.children().last().before(t), e.children().first().replaceWith(t.clone().addClass(u.clonedClass))) : (e.append(t), h.removeClass("disabled")), v.trigger("onAddItem", [t]), f
            }, seekTo: function (i, r, s) {
                var h, c, a;
                return (i.jquery || (i *= 1), u.circular && i === 0 && l == -1 && r !== 0) ? f : f.getSize() == 0 ? f : !u.circular && i < 0 || i > f.getSize() || i < -1 ? f : (h = i, i.jquery ? i = f.getItems().index(i) : h = f.getItems().eq(i), c = n.Event("onBeforeSeek"), !s && (v.trigger(c, [i, r]), c.isDefaultPrevented() || !h.length)) ? f : (a = o ? {top: -h.position().top} : {left: -h.position().left}, l = i, t = f, r === undefined && (r = u.speed), e.animate(a, r, u.easing, s || function () {
                    v.trigger("onSeek", [i])
                }), f)
            }
        });
        n.each(["onBeforeSeek", "onSeek", "onAddItem"], function (t, i) {
            n.isFunction(u[i]) && n(f).on(i, u[i]);
            f[i] = function (t) {
                return t && n(f).on(i, t), f
            }
        });
        u.circular && (y = f.getItems().slice(-1).clone().prependTo(e), p = f.getItems().eq(1).clone().appendTo(e), y.add(p).addClass(u.clonedClass), f.onBeforeSeek(function (n, t, i) {
            if (!n.isDefaultPrevented()) {
                if (t == -1) return f.seekTo(y, i, function () {
                    f.end(0)
                }), n.preventDefault();
                t == f.getSize() && f.seekTo(p, i, function () {
                    f.begin(0)
                })
            }
        }), a = r.parents().add(r).filter(function () {
            if (n(this).css("display") === "none") return !0
        }), a.length ? (a.show(), f.seekTo(0, 0, function () {
        }), a.hide()) : f.seekTo(0, 0, function () {
        }));
        s = i(r, u.prev).click(function (n) {
            n.stopPropagation();
            f.prev()
        });
        h = i(r, u.next).click(function (n) {
            n.stopPropagation();
            f.next()
        });
        u.circular || (f.onBeforeSeek(function (n, t) {
            setTimeout(function () {
                n.isDefaultPrevented() || (s.toggleClass(u.disabledClass, t <= 0), h.toggleClass(u.disabledClass, t >= f.getSize() - 1))
            }, 1)
        }), u.initialIndex || s.addClass(u.disabledClass));
        f.getSize() < 2 && s.add(h).addClass(u.disabledClass);
        u.mousewheel && n.fn.mousewheel && r.mousewheel(function (n, t) {
            if (u.mousewheel) return f.move(t < 0 ? 1 : -1, u.wheelSpeed || 50), !1
        });
        u.touch && (c = {}, e[0].ontouchstart = function (n) {
            var t = n.touches[0];
            c.x = t.clientX;
            c.y = t.clientY
        }, e[0].ontouchmove = function (n) {
            if (n.touches.length == 1 && !e.is(":animated")) {
                var t = n.touches[0], i = c.x - t.clientX, r = c.y - t.clientY;
                f[o && r > 0 || !o && i > 0 ? "next" : "prev"]();
                n.preventDefault()
            }
        });
        u.keyboard && n(document).on("keydown.scrollable", function (i) {
            if (!(!u.keyboard || i.altKey || i.ctrlKey || i.metaKey || n(i.target).is(":input"))) {
                if (u.keyboard != "static" && t != f) return;
                var r = i.keyCode;
                if (o && (r == 38 || r == 40)) return f.move(r == 38 ? -1 : 1), i.preventDefault();
                if (!o && (r == 37 || r == 39)) return f.move(r == 37 ? -1 : 1), i.preventDefault()
            }
        });
        u.initialIndex && f.seekTo(u.initialIndex, 0, function () {
        })
    }

    n.tools = n.tools || {version: "v1.2.7"};
    n.tools.scrollable = {
        conf: {
            activeClass: "active",
            circular: !1,
            clonedClass: "cloned",
            disabledClass: "disabled",
            easing: "swing",
            initialIndex: 0,
            item: "> *",
            items: ".items",
            keyboard: !0,
            mousewheel: !1,
            next: ".next",
            prev: ".prev",
            size: 1,
            speed: 400,
            vertical: !1,
            touch: !0,
            wheelSpeed: 0
        }
    };
    var t;
    n.fn.scrollable = function (t) {
        var i = this.data("scrollable");
        return i ? i : (t = n.extend({}, n.tools.scrollable.conf, t), this.each(function () {
            i = new r(n(this), t);
            n(this).data("scrollable", i)
        }), t.api ? i : this)
    }
}(jQuery), function (n) {
    var t = n.tools.scrollable;
    t.autoscroll = {conf: {autoplay: !0, interval: 3e3, autopause: !0}};
    n.fn.autoscroll = function (i) {
        typeof i == "number" && (i = {interval: i});
        var r = n.extend({}, t.autoscroll.conf, i), u;
        return this.each(function () {
            function o() {
                i && clearTimeout(i);
                i = setTimeout(function () {
                    t.next()
                }, r.interval)
            }

            var t = n(this).data("scrollable"), f = t.getRoot(), i, e = !1;
            if (t.getSize() == 0) return t;
            t && (u = t);
            t.play = function () {
                i || (e = !1, f.on("onSeek", o), o())
            };
            t.pause = function () {
                i = clearTimeout(i);
                f.off("onSeek", o)
            };
            t.resume = function () {
                e || t.play()
            };
            t.stop = function () {
                e = !0;
                t.pause()
            };
            r.autopause && f.add(t.getNaviButtons()).hover(t.pause, t.resume);
            r.autoplay && t.play()
        }), r.api ? u : this
    }
}(jQuery), function (n) {
    function i(t, i) {
        var r = n(i);
        return r.length < 2 ? r : t.parent().find(i)
    }

    var t = n.tools.scrollable;
    t.navigator = {
        conf: {
            navi: ".navi",
            naviItem: null,
            activeClass: "active",
            indexed: !1,
            idPrefix: null,
            history: !1
        }
    };
    n.fn.navigator = function (r) {
        typeof r == "string" && (r = {navi: r});
        r = n.extend({}, t.navigator.conf, r);
        var u;
        return this.each(function () {
            function c(n, i, r) {
                t.seekTo(i);
                r.preventDefault();
                h && history.pushState({i: i}, "")
            }

            function f() {
                return e.find(r.naviItem || "> *")
            }

            function l(t) {
                var i = n("<" + (r.naviItem || "a") + "/>").click(function (i) {
                    c(n(this), t, i)
                });
                return t === 0 && i.addClass(o), r.indexed && i.text(t + 1), r.idPrefix && i.attr("id", r.idPrefix + t), i.appendTo(e)
            }

            var t = n(this).data("scrollable"), e = r.navi.jquery ? r.navi : i(t.getRoot(), r.navi),
                a = t.getNaviButtons(), o = r.activeClass, h = r.history && history.pushState, s = t.getConf().size;
            t && (u = t);
            t.getNaviButtons = function () {
                return a.add(e)
            };
            h && (history.pushState({i: 0}, ""), n(window).on("popstate", function (n) {
                var i = n.originalEvent.state;
                i && t.seekTo(i.i)
            }));
            f().length ? f().each(function (t) {
                n(this).click(function (i) {
                    c(n(this), t, i)
                })
            }) : n.each(t.getItems(), function (n) {
                n % s == 0 && l(n)
            });
            t.onBeforeSeek(function (n, t) {
                setTimeout(function () {
                    if (!n.isDefaultPrevented()) {
                        var i = t / s, r = f().eq(i);
                        r.length && f().removeClass(o).eq(i).addClass(o)
                    }
                }, 1)
            });
            t.onAddItem(function (n, i) {
                var r = t.getItems().index(i);
                r % s == 0 && l(r)
            })
        }), r.api ? u : this
    }
}(jQuery), function (n) {
    function u(t, i, u) {
        var f = this, h = t.add(this), e = t.find(u.tabs), o = i.jquery ? i : t.children(i), s;
        e.length || (e = t.children());
        o.length || (o = t.parent().find(i));
        o.length || (o = n(i));
        n.extend(this, {
            click: function (i, o) {
                var c = e.eq(i), v = !t.data("tabs"), l, a;
                if (typeof i == "string" && i.replace("#", "") && (c = e.filter('[href*="' + i.replace("#", "") + '"]'), i = Math.max(e.index(c), 0)), u.rotate) {
                    if (l = e.length - 1, i < 0) return f.click(l, o);
                    if (i > l) return f.click(0, o)
                }
                if (!c.length) {
                    if (s >= 0) return f;
                    i = u.initialIndex;
                    c = e.eq(i)
                }
                return i === s ? f : (o = o || n.Event(), o.type = "onBeforeClick", h.trigger(o, [i]), !o.isDefaultPrevented() || n.browser.mozilla ? (a = v ? u.initialEffect && u.effect || "default" : u.effect, r[a].call(f, i, function () {
                    s = i;
                    o.type = "onClick";
                    h.trigger(o, [i])
                }), e.removeClass(u.current), c.addClass(u.current), f) : void 0)
            }, getConf: function () {
                return u
            }, getTabs: function () {
                return e
            }, getPanes: function () {
                return o
            }, getCurrentPane: function () {
                return o.eq(s)
            }, getCurrentTab: function () {
                return e.eq(s)
            }, getIndex: function () {
                return s
            }, next: function () {
                return f.click(s + 1)
            }, prev: function () {
                return f.click(s - 1)
            }, destroy: function () {
                return e.off(u.event).removeClass(u.current), o.find('a[href^="#"]').off("click.T"), f
            }
        });
        n.each("onBeforeClick,onClick".split(","), function (t, i) {
            n.isFunction(u[i]) && n(f).on(i, u[i]);
            f[i] = function (t) {
                return t && n(f).on(i, t), f
            }
        });
        u.history && n.fn.history && (n.tools.history.init(e), u.event = "history");
        e.each(function (t) {
            n(this).on(u.event, function (n) {
                return f.click(t, n), n.preventDefault()
            })
        });
        o.find('a[href^="#"]').on("click.T", function (t) {
            f.click(n(this).attr("href"), t)
        });
        location.hash && u.tabs == "a" && t.find('[href="' + location.hash + '"]').length ? f.click(location.hash) : (u.initialIndex === 0 || u.initialIndex > 0) && f.click(u.initialIndex)
    }

    n.tools = n.tools || {version: "v1.2.7"};
    n.tools.tabs = {
        conf: {
            tabs: "a",
            current: "current",
            onBeforeClick: null,
            onClick: null,
            effect: "default",
            initialEffect: !1,
            initialIndex: 0,
            event: "click",
            rotate: !1,
            slideUpSpeed: 400,
            slideDownSpeed: 400,
            history: !1
        }, addEffect: function (n, t) {
            r[n] = t
        }
    };
    var r = {
        "default": function (n, t) {
            this.getPanes().hide().eq(n).show();
            t.call()
        }, fade: function (n, t) {
            var r = this.getConf(), u = r.fadeOutSpeed, i = this.getPanes();
            u ? i.fadeOut(u) : i.hide();
            i.eq(n).fadeIn(r.fadeInSpeed, t)
        }, slide: function (n, t) {
            var i = this.getConf();
            this.getPanes().slideUp(i.slideUpSpeed);
            this.getPanes().eq(n).slideDown(i.slideDownSpeed, t)
        }, ajax: function (n, t) {
            this.getPanes().eq(0).load(this.getTabs().eq(n).attr("href"), t)
        }
    }, t, i;
    n.tools.tabs.addEffect("horizontal", function (r, u) {
        if (!t) {
            var f = this.getPanes().eq(r), e = this.getCurrentPane();
            i || (i = this.getPanes().eq(0).width());
            t = !0;
            f.show();
            e.animate({width: 0}, {
                step: function (n) {
                    f.css("width", i - n)
                }, complete: function () {
                    n(this).hide();
                    u.call();
                    t = !1
                }
            });
            e.length || (u.call(), t = !1)
        }
    });
    n.fn.tabs = function (t, i) {
        var r = this.data("tabs");
        return r && (r.destroy(), this.removeData("tabs")), n.isFunction(i) && (i = {onBeforeClick: i}), i = n.extend({}, n.tools.tabs.conf, i), this.each(function () {
            r = new u(n(this), t, i);
            n(this).data("tabs", r)
        }), i.api ? r : this
    }
}(jQuery), function (n) {
    function i(t, i) {
        function l(i) {
            var r = n(i);
            return r.length < 2 ? r : t.parent().find(i)
        }

        function c() {
            f && clearTimeout(f);
            f = setTimeout(function () {
                u.next()
            }, i.interval)
        }

        var r = this, e = t.add(this), u = t.data("tabs"), f, s = !0, a = l(i.next).click(function () {
            u.next()
        }), h = l(i.prev).click(function () {
            u.prev()
        }), o;
        n.extend(r, {
            getTabs: function () {
                return u
            }, getConf: function () {
                return i
            }, play: function () {
                if (f) return r;
                var t = n.Event("onBeforePlay");
                return (e.trigger(t), t.isDefaultPrevented()) ? r : (s = !1, e.trigger("onPlay"), e.on("onClick", c), c(), r)
            }, pause: function () {
                if (!f) return r;
                var t = n.Event("onBeforePause");
                return (e.trigger(t), t.isDefaultPrevented()) ? r : (f = clearTimeout(f), e.trigger("onPause"), e.off("onClick", c), r)
            }, resume: function () {
                s || r.play()
            }, stop: function () {
                r.pause();
                s = !0
            }
        });
        n.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","), function (t, u) {
            n.isFunction(i[u]) && n(r).on(u, i[u]);
            r[u] = function (t) {
                return n(r).on(u, t)
            }
        });
        i.autopause && u.getTabs().add(a).add(h).add(u.getPanes()).hover(r.pause, r.resume);
        i.autoplay && r.play();
        i.clickable && u.getPanes().click(function () {
            u.next()
        });
        u.getConf().rotate || (o = i.disabledClass, u.getIndex() || h.addClass(o), u.onBeforeClick(function (n, t) {
            h.toggleClass(o, !t);
            a.toggleClass(o, t == u.getTabs().length - 1)
        }))
    }

    var t;
    t = n.tools.tabs.slideshow = {
        conf: {
            next: ".forward",
            prev: ".backward",
            disabledClass: "disabled",
            autoplay: !1,
            autopause: !0,
            interval: 3e3,
            clickable: !0,
            api: !1
        }
    };
    n.fn.slideshow = function (r) {
        var u = this.data("slideshow");
        return u ? u : (r = n.extend({}, t.conf, r), this.each(function () {
            u = new i(n(this), r);
            n(this).data("slideshow", u)
        }), r.api ? u : this)
    }
}(jQuery), function () {
    function t(n, t) {
        if (t) for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]);
        return n
    }

    function s(n, t) {
        var r = [];
        for (var i in n) n.hasOwnProperty(i) && (r[i] = t(n[i]));
        return r
    }

    function h(u, e, o) {
        if (n.isSupported(e.version)) u.innerHTML = n.getHTML(e, o); else if (e.expressInstall && n.isSupported([6, 65])) u.innerHTML = n.getHTML(t(e, {src: e.expressInstall}), {
            MMredirectURL: location.href,
            MMplayerType: "PlugIn",
            MMdoctitle: document.title
        }); else if (u.innerHTML.replace(/\s/g, "") || (u.innerHTML = "<h2>Flash version " + e.version + " or greater is required<\/h2><h3>" + (i[0] > 0 ? "Your version is " + i : "You have no flash plugin installed") + "<\/h3>" + (u.tagName == "A" ? "<p>Click here to download latest version<\/p>" : "<p>Download latest version from <a href='" + f + "'>here<\/a><\/p>"), u.tagName == "A" && (u.onclick = function () {
            location.href = f
        })), e.onFail) {
            var s = e.onFail.call(this);
            typeof s == "string" && (u.innerHTML = s)
        }
        r && (window[e.id] = document.getElementById(e.id));
        t(this, {
            getRoot: function () {
                return u
            }, getOptions: function () {
                return e
            }, getConf: function () {
                return o
            }, getApi: function () {
                return u.firstChild
            }
        })
    }

    var r = document.all, f = "http://www.adobe.com/go/getflashplayer", e = typeof jQuery == "function",
        o = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, u = {
            width: "100%",
            height: "100%",
            id: "_" + ("" + Math.random()).slice(9),
            allowfullscreen: !0,
            allowscriptaccess: "always",
            quality: "high",
            version: [3, 0],
            onFail: null,
            expressInstall: null,
            w3c: !1,
            cachebusting: !1
        }, n, i;
    window.attachEvent && window.attachEvent("onbeforeunload", function () {
        __flash_unloadHandler = function () {
        };
        __flash_savedUnloadHandler = function () {
        }
    });
    window.flashembed = function (n, i, r) {
        return typeof n == "string" && (n = document.getElementById(n.replace("#", ""))), n ? (typeof i == "string" && (i = {src: i}), new h(n, t(t({}, u), i), r)) : void 0
    };
    n = t(window.flashembed, {
        conf: u, getVersion: function () {
            var t, n;
            try {
                n = navigator.plugins["Shockwave Flash"].description.slice(16)
            } catch (i) {
                try {
                    t = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
                    n = t && t.GetVariable("$version")
                } catch (r) {
                    try {
                        t = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                        n = t && t.GetVariable("$version")
                    } catch (u) {
                    }
                }
            }
            return n = o.exec(n), n ? [n[1], n[3]] : [0, 0]
        }, asString: function (t) {
            var i, u, r;
            if (t === null || t === undefined) return null;
            i = typeof t;
            i == "object" && t.push && (i = "array");
            switch (i) {
                case"string":
                    return t = t.replace(new RegExp('(["\\\\])', "g"), "\\$1"), t = t.replace(/^\s?(\d+\.?\d*)%/, "$1pct"), '"' + t + '"';
                case"array":
                    return "[" + s(t, function (t) {
                        return n.asString(t)
                    }).join(",") + "]";
                case"function":
                    return '"function()"';
                case"object":
                    u = [];
                    for (r in t) t.hasOwnProperty(r) && u.push('"' + r + '":' + n.asString(t[r]));
                    return "{" + u.join(",") + "}"
            }
            return String(t).replace(/\s/g, " ").replace(/\'/g, '"')
        }, getHTML: function (i, u) {
            var f, o, e, s, h;
            i = t({}, i);
            f = '<object width="' + i.width + '" height="' + i.height + '" id="' + i.id + '" name="' + i.id + '"';
            i.cachebusting && (i.src += (i.src.indexOf("?") != -1 ? "&" : "?") + Math.random());
            f += i.w3c || !r ? ' data="' + i.src + '" type="application/x-shockwave-flash"' : ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
            f += ">";
            (i.w3c || r) && (f += '<param name="movie" value="' + i.src + '" />');
            i.width = i.height = i.id = i.w3c = i.src = null;
            i.onFail = i.version = i.expressInstall = null;
            for (o in i) i[o] && (f += '<param name="' + o + '" value="' + i[o] + '" />');
            if (e = "", u) {
                for (s in u) u[s] && (h = u[s], e += s + "=" + encodeURIComponent(/function|object/.test(typeof h) ? n.asString(h) : h) + "&");
                e = e.slice(0, -1);
                f += '<param name="flashvars" value=\'' + e + "' />"
            }
            return f + "<\/object>"
        }, isSupported: function (n) {
            return i[0] > n[0] || i[0] == n[0] && i[1] >= n[1]
        }
    });
    i = n.getVersion();
    e && (jQuery.tools = jQuery.tools || {version: "v1.2.7"}, jQuery.tools.flashembed = {conf: u}, jQuery.fn.flashembed = function (n, t) {
        return this.each(function () {
            jQuery(this).data("flashembed", flashembed(this, n, t))
        })
    })
}(), function (n) {
    function i(t, i, r) {
        var u = r.relative ? t.position().top : t.offset().top, e = r.relative ? t.position().left : t.offset().left,
            f = r.position[0], o, s;
        return u -= i.outerHeight() - r.offset[0], e += t.outerWidth() + r.offset[1], /iPad/i.test(navigator.userAgent) && (u -= n(window).scrollTop()), o = i.outerHeight() + t.outerHeight(), f == "center" && (u += o / 2), f == "bottom" && (u += o), f = r.position[1], s = i.outerWidth() + t.outerWidth(), f == "center" && (e -= s / 2), f == "left" && (e -= s), {
            top: u,
            left: e
        }
    }

    function r(r, u) {
        var f = this, h = r.add(f), e, l = 0, a = 0, c = r.attr("title"), v = r.attr("data-tooltip"), y = t[u.effect],
            s, p = r.is(":input"), b = p && r.is(":checkbox, :radio, select, :button, :submit"), w = r.attr("type"),
            o = u.events[w] || u.events[p ? b ? "widget" : "input" : "def"];
        if (!y) throw'Nonexistent effect "' + u.effect + '"';
        if (o = o.split(/,\s*/), o.length != 2) throw"Tooltip: bad events configuration for " + w;
        r.on(o[0], function (n) {
            clearTimeout(l);
            u.predelay ? a = setTimeout(function () {
                f.show(n)
            }, u.predelay) : f.show(n)
        }).on(o[1], function (n) {
            clearTimeout(a);
            u.delay ? l = setTimeout(function () {
                f.hide(n)
            }, u.delay) : f.hide(n)
        });
        c && u.cancelDefault && (r.removeAttr("title"), r.data("title", c));
        n.extend(f, {
            show: function (t) {
                var w, p;
                if (!e && (v ? e = n(v) : u.tip ? e = n(u.tip).eq(0) : c ? e = n(u.layout).addClass(u.tipClass).appendTo(document.body).hide().append(c) : (e = r.next(), e.length || (e = r.parent().next())), !e.length)) throw"Cannot find tooltip for " + r;
                return f.isShown() ? f : (e.stop(!0, !0), w = i(r, e, u), u.tip && e.html(r.data("title")), t = n.Event(), t.type = "onBeforeShow", h.trigger(t, [w]), t.isDefaultPrevented()) ? f : (w = i(r, e, u), e.css({
                    position: "absolute",
                    top: w.top,
                    left: w.left
                }), s = !0, y[0].call(f, function () {
                    t.type = "onShow";
                    s = "full";
                    h.trigger(t)
                }), p = u.events.tooltip.split(/,\s*/), e.data("__set") || (e.off(p[0]).on(p[0], function () {
                    clearTimeout(l);
                    clearTimeout(a)
                }), p[1] && !r.is("input:not(:checkbox, :radio), textarea") && e.off(p[1]).on(p[1], function (n) {
                    n.relatedTarget != r[0] && r.trigger(o[1].split(" ")[0])
                }), u.tip || e.data("__set", !0)), f)
            }, hide: function (i) {
                return !e || !f.isShown() ? f : (i = n.Event(), i.type = "onBeforeHide", h.trigger(i), i.isDefaultPrevented() ? void 0 : (s = !1, t[u.effect][1].call(f, function () {
                    i.type = "onHide";
                    h.trigger(i)
                }), f))
            }, isShown: function (n) {
                return n ? s == "full" : s
            }, getConf: function () {
                return u
            }, getTip: function () {
                return e
            }, getTrigger: function () {
                return r
            }
        });
        n.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function (t, i) {
            n.isFunction(u[i]) && n(f).on(i, u[i]);
            f[i] = function (t) {
                return t && n(f).on(i, t), f
            }
        })
    }

    n.tools = n.tools || {version: "v1.2.7"};
    n.tools.tooltip = {
        conf: {
            effect: "toggle",
            fadeOutSpeed: "fast",
            predelay: 0,
            delay: 30,
            opacity: 1,
            tip: 0,
            fadeIE: !1,
            position: ["top", "center"],
            offset: [0, 0],
            relative: !1,
            cancelDefault: !0,
            events: {
                def: "mouseenter,mouseleave",
                input: "focus,blur",
                widget: "focus mouseenter,blur mouseleave",
                tooltip: "mouseenter,mouseleave"
            },
            layout: "<div/>",
            tipClass: "tooltip"
        }, addEffect: function (n, i, r) {
            t[n] = [i, r]
        }
    };
    var t = {
        toggle: [function (n) {
            var r = this.getConf(), t = this.getTip(), i = r.opacity;
            i < 1 && t.css({opacity: i});
            t.show();
            n.call()
        }, function (n) {
            this.getTip().hide();
            n.call()
        }], fade: [function (t) {
            var i = this.getConf();
            !n.browser.msie || i.fadeIE ? this.getTip().fadeTo(i.fadeInSpeed, i.opacity, t) : (this.getTip().show(), t())
        }, function (t) {
            var i = this.getConf();
            !n.browser.msie || i.fadeIE ? this.getTip().fadeOut(i.fadeOutSpeed, t) : (this.getTip().hide(), t())
        }]
    };
    n.fn.tooltip = function (t) {
        var i = this.data("tooltip");
        return i ? i : (t = n.extend(!0, {}, n.tools.tooltip.conf, t), typeof t.position == "string" && (t.position = t.position.split(/,?\s/)), this.each(function () {
            i = new r(n(this), t);
            n(this).data("tooltip", i)
        }), t.api ? i : this)
    }
}(jQuery), function (n) {
    function i(t) {
        var i = n(window), r = i.width() + i.scrollLeft(), u = i.height() + i.scrollTop();
        return [t.offset().top <= i.scrollTop(), r <= t.offset().left + t.width(), u <= t.offset().top + t.height(), i.scrollLeft() >= t.offset().left]
    }

    function r(n) {
        for (var t = n.length; t--;) if (n[t]) return !1;
        return !0
    }

    var t = n.tools.tooltip;
    t.dynamic = {conf: {classNames: "top right bottom left"}};
    n.fn.dynamic = function (u) {
        typeof u == "number" && (u = {speed: u});
        u = n.extend({}, t.dynamic.conf, u);
        var o = n.extend(!0, {}, u), e = u.classNames.split(/\s/), f;
        return this.each(function () {
            var t = n(this).tooltip().onBeforeShow(function (t, u) {
                var c = this.getTip(), s = this.getConf(), l, h;
                f || (f = [s.position[0], s.position[1], s.offset[0], s.offset[1], n.extend({}, s)]);
                n.extend(s, f[4]);
                s.position = [f[0], f[1]];
                s.offset = [f[2], f[3]];
                c.css({visibility: "hidden", position: "absolute", top: u.top, left: u.left}).show();
                l = n.extend(!0, {}, o);
                h = i(c);
                r(h) || (h[2] && (n.extend(s, l.top), s.position[0] = "top", c.addClass(e[0])), h[3] && (n.extend(s, l.right), s.position[1] = "right", c.addClass(e[1])), h[0] && (n.extend(s, l.bottom), s.position[0] = "bottom", c.addClass(e[2])), h[1] && (n.extend(s, l.left), s.position[1] = "left", c.addClass(e[3])), (h[0] || h[2]) && (s.offset[0] *= -1), (h[1] || h[3]) && (s.offset[1] *= -1));
                c.css({visibility: "visible"}).hide()
            });
            t.onBeforeShow(function () {
                var n = this.getConf(), t = this.getTip();
                setTimeout(function () {
                    n.position = [f[0], f[1]];
                    n.offset = [f[2], f[3]]
                }, 0)
            });
            t.onHide(function () {
                var n = this.getTip();
                n.removeClass(u.classNames)
            });
            ret = t
        }), u.api ? ret : this
    }
}(jQuery), function (n) {
    var i = n.tools.tooltip, t;
    n.extend(i.conf, {
        direction: "up",
        bounce: !1,
        slideOffset: 10,
        slideInSpeed: 200,
        slideOutSpeed: 200,
        slideFade: !n.browser.msie
    });
    t = {up: ["-", "top"], down: ["+", "top"], left: ["-", "left"], right: ["+", "left"]};
    i.addEffect("slide", function (n) {
        var i = this.getConf(), r = this.getTip(), u = i.slideFade ? {opacity: i.opacity} : {},
            f = t[i.direction] || t.up;
        u[f[1]] = f[0] + "=" + i.slideOffset;
        i.slideFade && r.css({opacity: 0});
        r.show().animate(u, i.slideInSpeed, n)
    }, function (i) {
        var r = this.getConf(), o = r.slideOffset, f = r.slideFade ? {opacity: 0} : {}, e = t[r.direction] || t.up,
            u = "" + e[0];
        r.bounce && (u = u == "+" ? "-" : "+");
        f[e[1]] = u + "=" + o;
        this.getTip().animate(f, r.slideOutSpeed, function () {
            n(this).hide();
            i.call()
        })
    })
}(jQuery), function (n) {
    n.fn.autoFade = function (t) {
        function c(n) {
            r != n && (r = n, u && clearInterval(u), f && clearTimeout(f), i.fadeOut(), i.eq(n).fadeIn(), h(n), f = setTimeout(function () {
                s()
            }, t.interval))
        }

        function s() {
            u = setInterval(function () {
                r++;
                r >= o && (r = 0);
                i.fadeOut();
                i.eq(r).fadeIn();
                h(r)
            }, t.interval)
        }

        function h(i) {
            if (t.nav) {
                var r = n(t.nav);
                r.children().removeClass(t.activeClass);
                r.children().eq(i).addClass(t.activeClass)
            }
        }

        n(this).children(":empty").remove();
        var r = 0, t = n.extend({tag: "li", speed: 1e3, interval: 3e3, activeClass: "current"}, t || {}), e = n(this),
            i = e.children(t.tag), o = i.length, u, f;
        if (o <= 1) return e;
        t.nav && (n.each(i, function (i) {
            var r = n("<a href='javascript:;'><\/a>");
            r.click(function () {
                c(i)
            });
            n(t.nav).append(r)
        }), n(t.nav).children().eq(0).addClass(t.activeClass));
        i.hide();
        i.eq(0).show();
        s()
    }
}(jQuery), function (n) {
    n.cookie = function (t, i, r) {
        var h, f, e, o, u, s;
        if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(i)) || i === null || i === undefined)) return r = n.extend({}, r), (i === null || i === undefined) && (r.expires = -1), typeof r.expires == "number" && (h = r.expires, f = r.expires = new Date, f.setDate(f.getDate() + h)), i = String(i), document.cookie = [encodeURIComponent(t), "=", r.raw ? i : encodeURIComponent(i), r.expires ? "; expires=" + r.expires.toUTCString() : "", r.path ? "; path=" + r.path : "", r.domain ? "; domain=" + r.domain : "", r.secure ? "; secure" : ""].join("");
        for (r = i || {}, e = r.raw ? function (n) {
            return n
        } : decodeURIComponent, o = document.cookie.split("; "), u = 0; s = o[u] && o[u].split("="); u++) if (e(s[0]) === t) return e(s[1] || "");
        return null
    }
}(jQuery), function (n) {
    function s() {
        if (n.browser.msie) {
            var t = n(document).height(), i = n(window).height();
            return [window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, t - i < 20 ? i : t]
        }
        return [n(document).width(), n(document).height()]
    }

    function u(t) {
        if (t) return t.call(n.mask)
    }

    var o, t, f, i, r, e;
    n.tools = n.tools || {version: "v1.2.7"};
    o = n.tools.expose = {
        conf: {
            maskId: "exposeMask",
            loadSpeed: "slow",
            closeSpeed: "fast",
            closeOnClick: !0,
            closeOnEsc: !0,
            zIndex: 9998,
            opacity: .8,
            startOpacity: 0,
            color: "#fff",
            onLoad: null,
            onClose: null
        }
    };
    n.mask = {
        load: function (h, c) {
            if (i) return this;
            typeof h == "string" && (h = {color: h});
            h = h || r;
            r = h = n.extend(n.extend({}, o.conf), h);
            t = n("#" + h.maskId);
            t.length || (t = n("<div/>").attr("id", h.maskId), n("body").append(t));
            var l = s();
            return (t.css({
                position: "absolute",
                top: 0,
                left: 0,
                width: l[0],
                height: l[1],
                display: "none",
                opacity: h.startOpacity,
                zIndex: h.zIndex
            }), h.color && t.css("backgroundColor", h.color), u(h.onBeforeLoad) === !1) ? this : (h.closeOnEsc && n(document).on("keydown.mask", function (t) {
                t.keyCode == 27 && n.mask.close(t)
            }), h.closeOnClick && t.on("click.mask", function (t) {
                n.mask.close(t)
            }), n(window).on("resize.mask", function () {
                n.mask.fit()
            }), c && c.length && (e = c.eq(0).css("zIndex"), n.each(c, function () {
                var t = n(this);
                /relative|absolute|fixed/i.test(t.css("position")) || t.css("position", "relative")
            }), f = c.css({zIndex: Math.max(h.zIndex + 1, e == "auto" ? 0 : e)})), t.css({display: "block"}).fadeTo(h.loadSpeed, h.opacity, function () {
                n.mask.fit();
                u(h.onLoad);
                i = "full"
            }), i = !0, this)
        }, close: function () {
            if (i) {
                if (u(r.onBeforeClose) === !1) return this;
                t.fadeOut(r.closeSpeed, function () {
                    u(r.onClose);
                    f && f.css({zIndex: e});
                    i = !1
                });
                n(document).off("keydown.mask");
                t.off("click.mask");
                n(window).off("resize.mask")
            }
            return this
        }, fit: function () {
            if (i) {
                var n = s();
                t.css({width: n[0], height: n[1]})
            }
        }, getMask: function () {
            return t
        }, isLoaded: function (n) {
            return n ? i == "full" : i
        }, getConf: function () {
            return r
        }, getExposed: function () {
            return f
        }
    };
    n.fn.mask = function (t) {
        return n.mask.load(t), this
    };
    n.fn.expose = function (t) {
        return n.mask.load(t, this), this
    }
}(jQuery);
$(function () {
    $($("#J_NavBox").children()[0]).attr("class", "menu-index menu-index-on");
    $(".mobile-banner-close span").click(function () {
        $(".mobile-banner-btm").hide()
    });
    $("#c2_slide").scrollable({circular: !0, prev: "#c2_slide_prev", next: "#c2_slide_next"});
    $("#SearchStore").keyup(function () {
        var r = BookingInfo.Type === "get" ? $(BookTarget.PickupCityId).attr("value") : $(BookTarget.ReturnCityId).attr("value"),
            n = $(this).val(), t, i;
        if (n.length < 3) return !1;
        t = BookingInfo.Type === "get" ? $("#pickUpCityId").val() : $("#returnCityId").val();
        i = "&address=" + n + "&cityId=" + t;
        setTimeout(function () {
            BookingAjax.ReqStoreAsync(BookingAjax.Url.MapPositionAddress, i, "MapPositionAddress", function (t) {
                MapCommon.func.GetPosition(r + n);
                $("#addresslist").html(t)
            })
        }, 100)
    });
    $("#addresslist").delegate("li", "click", function () {
        var n = $(this);
        n.addClass("send-cur").siblings().removeClass("send-cur");
        n.find("input").removeClass("hidden").parents("li").siblings().find("input").addClass("hidden");
        setTimeout(function () {
            MapCommon.func.GetAddress(n.attr("lng"), n.attr("lat"))
        }, 100)
    });
    $("#addresslist").delegate("input", "click", function () {
        if (this.id === "btnStore") return !1;
        var n = $("#addresslist").find("li[class='send-cur']"), t = n.attr("lat"), i = n.attr("lng"),
            r = n.find(".send-storename").text(), u = n.find(".send-storearea").text();
        if (!IsAllowMapService(i, t)) return !1;
        BookingInfo.Type === "get" ? ($("#getlng").val(i), $("#getlat").val(t), $(BookTarget.SendServiceId).val(r), BookingInfo.SendCarHtml = '<li class="send-cur" lat="' + t + '" lng="' + i + '">' + n.html() + "<\/li>", $("#getAddress").val(u)) : ($("#retlng").val(i), $("#retlat").val(t), $(BookTarget.ReturnServiceId).val(r), BookingInfo.TakeCarHtml = '<li class="send-cur" lat="' + t + '" lng="' + i + '"' + n.html() + "<\/li>", $("#retAddress").val(u));
        $("#shcMapBox").addClass("hidden")
    });
    $("#addresslist").delegate("#btnStore", "click", function () {
        var n, t, i, r;
        $("#shcMapBox").addClass("hidden");
        n = $(this).attr("abbrname");
        t = $(this).attr("sid");
        BookingInfo.Type === "get" ? ($(BookTarget.PickupStoreNameId).val(n), $("#getStoreId").val(t)) : ($("#retStoreId").val(t), $(BookTarget.ReturnStoreNameId).val(n));
        i = BookingInfo.Type === "get";
        r = i ? "#txtGetCarAddress" : "#txtDropCarAddress";
        i ? $(BookTarget.PickupStoreNameId).show() : $(BookTarget.ReturnStoreNameId).show();
        $(r).hide();
        $("#" + BookingInfo.Type + "Check").attr("checked", !1)
    })
});
GetCity();
$(function () {
    function i(n, t) {
        $("#BannerPic .banner:eq(" + n + ")").fadeOut();
        $("#BannerPic .banner:eq(" + t + ")").fadeIn();
        $(".banner-libox li").eq(t).addClass("blue").siblings("li").removeClass("blue")
    }

    function c() {
        s = setInterval(function () {
            bNum = n + 1 > r ? 0 : n + 1;
            i(n, bNum);
            n = bNum
        }, 4e3)
    }

    function v() {
        t.children("li:first").animate({marginLeft: "-" + e + "px"}, 800, "swing", function () {
            $(this).css({marginLeft: "16px"}).appendTo(t)
        })
    }

    function l() {
        $(".mobile-bannerbox").animate({left: "-100%"}, 800, function () {
            $(".mobile-bannericon").css("display", "block").animate({left: "0%"}, 500);
            $(".mobile-bannerbox").css("display", "none")
        })
    }

    function y() {
        $(".mobile-bannericon").animate({left: "-106px"}, 500, function () {
            $(".mobile-bannerbox").css("display", "block").animate({left: "0%"}, 800);
            $(".mobile-bannericon").css("display", "none")
        })
    }

    function p() {
        switchmb = setInterval(function () {
            l()
        }, 5e3)
    }

    var o = $("#BannerPic .banner").length, r = o - 1, n = 0, s, h, u, f;
    for ($("#BannerPic").children(".banner:first").css("display", "block"), h = "<li><\/li>", u = 0; u < o; u++) $(".banner-libox").append(h);
    $(".banner-libox").find("li").first().addClass("blue");
    $(".banner-libox li").click(function () {
        bNum = $(this).index();
        i(n, bNum);
        n = bNum
    });
    $(".banner-prev").click(function () {
        bNum = n - 1 < 0 ? r : n - 1;
        i(n, bNum);
        n = bNum
    });
    $(".banner-next").click(function () {
        bNum = n + 1 > r ? 0 : n + 1;
        i(n, bNum);
        n = bNum
    });
    $(".banner-box").hover(function () {
        clearInterval(s);
        $(".banner-btn").fadeIn()
    }, function () {
        c();
        $(".banner-btn").fadeOut()
    });
    c();
    $("#bannerVideo").on("click", function () {
        $(".video-popup").show();
        var n = document.getElementById("myVideo");
        n.load();
        n.play()
    });
    $(".video-close").on("click", function () {
        $(".video-popup").hide();
        var n = document.getElementById("myVideo");
        n.pause()
    });
    $(".hotcar-classify > a").live("mouseenter", function () {
        $(this).children(".hotcar-car").animate({right: "75px"})
    }).live("mouseleave", function () {
        $(".hotcar-car").stop(!0);
        $(this).children(".hotcar-car").css("right", "-20px")
    });
    $(".hotcity-classify li").click(function () {
        var n = $(this).text();
        n !== "更多" && $("#rzloading").removeClass("hidden");
        this.id !== "gd" && $(this).addClass("hotcity-cur").siblings().removeClass("hotcity-cur");
        n !== "更多" && BookingAjax.ReqStore(BookingAjax.Url.HotCartype, "&city=" + encodeURIComponent(n), "HotCartype", function (n) {
            if ($("#rzloading").addClass("hidden"), n === "" || n === undefined) return $("#hotCartype").html("<div class='hotcar-none'><img src='/Content/Index/Images/hotcar-none.png' width='100%' alt=''>暂无车型<\/div>"), !1;
            $("#hotCartype").html(n)
        })
    });
    $(".hotcar-icon a").mouseover(function () {
        $(this).children(".hotcar-brand").show().parents().siblings().children(".hotcar-brand").hide()
    });
    $(".hotcar-icon a").mouseleave(function () {
        $(this).children(".hotcar-brand").hide()
    });
    f = $(".activity-list li").length;
    f > 4 && $(".activity-prev,.activity-next").show();
    var t = $(".activity-list"), e = $(".activity-list li").outerWidth(!0), a = parseInt(e * f);
    t.width(a);
    $(".activity-next").on("click", function () {
        var n = parseInt(t.children("li:first").css("marginLeft"));
        n == 16 && v()
    });
    $(".activity-prev").on("click", function () {
        var n = parseInt(t.children("li:first").css("marginLeft"));
        n == 16 && (t.children("li:first").before(t.children("li:last")), t.children("li:first").css({marginLeft: "-" + e + "px"}).animate({marginLeft: "16"}, 800, "swing"))
    });
    $("#mb-close").on("click", function () {
        clearInterval(switchmb);
        l()
    });
    $("#mb-show").on("click", function () {
        clearInterval(switchmb);
        y()
    });
    p();
    $(window).scroll(function () {
        var n = $(document).scrollTop();
        n > 530 ? $(".quick-nav").stop(!0).css({bottom: "auto"}).animate({top: "30px"}, 500) : $(".quick-nav").stop(!0).css({top: "auto"}).animate({bottom: "5px"}, 500)
    });
    $("#goTop").click(function () {
        $("body, html").animate({scrollTop: 0}, 500)
    })
});
initMap();
initHotCarType();
eval(function (n, t) {
    return n.replace(/\w+/g, function (n) {
        return t[parseInt(n, 36)]
    })
}("(0($){\r$.1.2 = 0(3){\r4 5 = {\r6:7,\r8:9,\ra:b,\rc:d,\re:'f',\rg:'h h',\ri:{\rj:'k',\rl:m,\rn:{o:'p',6:'p',q:'p',r:'s',t:'s',u:'s',v:\"#w\",x:\"y z #10\",11:\"#12\",13:'h',14:'15',16:\"17\",18:'19'},\r1a:{v:\"#1b\",x:\"y z #1c\",11:\"#1d\"}\r},\r1e:0(1f,1g){}\r};\r1h = 1i.1j(d,{},5,3);\r4 1k = {};\r1k.1l = $(1m).1l;\r1n($(1m).1o>1p){\r$.1q('2 1q[1r 1s 1t 1u 1v]');\r1w m;\r}\r1k.1x = 1m;\r1k.1f = 1y;\r1k.1z = 1y;\r1k.20 = $(1k.1x).21('22').20();\r1k.23 = '24' + 1k.1l.25(/\\26/27,'') + '28';\r1k.29 = {};\r1k.1 = {};\r1k.2a = 0(){\r$(1k.1x).2b({o:'2c%',6:1h.6,2d:'2e',2f:'2g'}).21('22').2h(1k.23+'2i').2j();\r1k.2k();\r};\r1k.2k = 0(){\r1k.2l();\r1k.2m();\r};\r1k.2l = 0(){\r$(1k.1x).21('22').2n('<22 2o=\"'+1k.23+'2p\"><\/22>');\r$('.'+1k.23+'2i',1k.1x).2q(0() {\r4 2r = $(1m).21('2r');\r1n(2r.1o){\r4 2s = 2r.21('2t').2u('2v');\r2r.21('2t').2w();\r2r.2h(1k.23+'2x');\r}2y{\r4 2s = $(1m).21('2t').2u('2v');\r$(1m).21('2t').2w();\r}\r$(1m).2b({v:'2z('+2s+') 30-31 '+1h.g,'32-1f':1p});\r});\r$('.'+1k.23+'2i',1k.1x).33(1y).2b('32-1f','34');\r1n(1h.i.n.35!='36'){\r4 37 = '';\r38(39=1p;39<=1k.20;39++){\r1n(1h.i.l){\r37+='<3a>'+39+'<\/3a>';\r}2y{\r37+='<3a> <\/3a>';\r}\r}\r$(1k.1x).3b('<3c 2o=\"'+1k.23+'i\">'+37+'<\/3c>');\r$('.'+1k.23+'i 3a',1k.1x).33(1y).2h(1k.23+'1a');\r}\r1k.3d();\r$('.'+1k.23+'2i:3e(1y)',1k.1x).2b('32-1f',1p).2b({3f:1y});\r$('.'+1k.23+'2i',1k.1x).3g();\r$(1k.1x).2b({2d:'3h',3i:'3h',35:'3j'});\r};\r1k.3d = 0(){\r4 3k = '<3l 3m=\"3n/2b\">';\r3k+= 1k.1l+' *{ 3o:1y;3p:1y;} ';\r3k+= 1k.1l+' .'+1k.23+'2p{o:2c%;6:'+3q(1h.6)+'3r;2f:2g;32-1f:1p;} ';\r3k+= 1k.1l+' .'+1k.23+'2p .'+1k.23+'2i{o:2c%;6:'+3q(1h.6)+'3r;2f:3s;2d:2e;} ';\r3k+= 1k.1l+' .'+1k.23+'2p .'+1k.23+'2i 2r.'+1k.23+'2x{o:2c%;6:'+3q(1h.6)+'3r;35:3j;3n-3t:36;3p:1y;3o:1y;v:3u;3n-3v:1y;3w:36;2j-1a:3x(1m.3y=d);} ';\r1n(1h.i.n.35!='36'){\r3k+= 1k.1l+' .'+1k.23+'i{'+1k.1.3z(1h.i.n,['40','r','t','19'],d)+';2f:3s;41-3l:36;32-1f:34;2d:2e;42:1p;}';\r3k+= 1k.1l+' .'+1k.23+'i 3a{'+1k.1.3z(1h.i.n,['40','r','t','19'])+';43:44;-45-3n-20-46:36;}';\r3k+= 1k.1l+' .'+1k.23+'i 3a.'+1k.23+'1a{'+1k.1.3z(1h.i.1a,['40','r','t','19'])+';43:47;}';\r}\r3k+= '<\/3l>';\r$(1k.1x).48(3k);\r}\r1k.2m = 0(){\r1h.1e.49($('.'+1k.23+'2i:33('+1k.1f+')',1k.1x),1k.1f,'4a');\r4 4b;\r$('.'+1k.23+'i',1k.1x).4c('3a',1h.i.j,0(){\r4d = 1m;\r0 4e(){\r1k.1f = $(4d).1f();\r1k.4f();\r}\r1n(1h.i.j=='4g'){\r4b = 4h(4e,4i);\r}2y{\r4e();\r}\r})\r1n(1h.i.j=='4g'){\r$('.'+1k.23+'i',1k.1x).4c('3a','4j',0(){\r4k(4b);\r})\r}\r1k.1f = 1p;\r1k.1z = 1y;\r1k.29.4l = 4m(1k.4f,1h.8*b+1h.a);\r1n(1h.c){\r$(1k.1x).4n(0(){\r4o(1k.29.4l);\r},0(){\r1k.29.4l = 4m(1k.4f,1h.8*b+1h.a);\r})\r}\r};\r1k.4f = 0(){\r1h.1e.49($('.'+1k.23+'2i:33('+(1k.1z)+')',1k.1x),1k.1z,'4p');\r1n(1h.i.n.35!='36'){\r$('3c.'+1k.23+'i 3a',1k.1x).4q(1k.23+'1a');\r$('3c.'+1k.23+'i 3a',1k.1x).33(1k.1f).2h(1k.23+'1a');\r}\r$('.'+1k.23+'2i:4r',1k.1x).4s(d,m);\r$('.'+1k.23+'2i',1k.1x).2b('32-1f',1p);\r$('.'+1k.23+'2i',1k.1x).33(1k.1f).2b({3f:1y,'32-1f':34});\r$('.'+1k.23+'2i',1k.1x).33(1k.1f).4t({3f:1p},1h.a,1h.e,0(){\r$('.'+1k.23+'2p .'+1k.23+'2i:4u(:33('+1k.1f+'))',1k.1x).2b({3f:1y});\r1h.1e.49($('.'+1k.23+'2i:33('+1k.1f+')',1k.1x),1k.1f,'4a');\r1k.1z = 1k.1f;\r1n(1k.1f==1k.20-1p){\r1k.1f=1y;\r}2y{\r1k.1f++;\r}\r}\r);\r};\r1k.4v = 0(){\r1k.2a();\r};\r1k.1.3z = 0(4w,4x,4y){\r4y = 4y?d:m;\r4 4z = 50.51.52(\"53\")!=-1p;\r4 3l = '';\r1n(4y){\r38 (4 54 55 4w){\r1n($.56(54,4x)!=-1p){\r57 = 54.25(/([58-59])/,5a);\r1n(57=='3f' && 4z){\r3l +=\"5b:5c(3f=\"+(4w[54]*2c)+\");\";\r}2y{\r3l +=57+\":\"+4w[54]+\";\";\r}\r}\r};\r}2y{\r38 (4 54 55 4w){\r1n($.5d(4x)){\r1n($.56(54,4x)==-1p){\r57 = 54.25(/([58-59])/,5a);\r1n(57=='3f' && 4z){\r3l +=\"5b:5c(3f=\"+(4w[54]*2c)+\");\";\r}2y{\r3l +=57+\":\"+4w[54]+\";\";\r}\r}\r}2y{\r57 = 54.25(/([58-59])/,5a);\r1n(57=='3f' && 4z){\r3l +=\"5b:5c(3f=\"+(4w[54]*2c)+\");\";\r}2y{\r3l +=57+\":\"+4w[54]+\";\";\r}\r}\r};\r}\r0 5a(5e){\r4 5f='';\r5f = '-'+5e.5g();\r1w 5f;\r};\r1w 3l;\r};\r1k.4v();\r}\r})(1i)", "function|fn|kinMaxShow|user_options|var|default_options|height|310|intervalTime|3|switchTime|1000|hoverPause|true|easing|linear|imageAlign|center|button|switchEvent|mouseover|showIndex|false|normal|width|14px|lineHeight|right|10px|bottom|fontSize|background|cccaca|border|1px|solid|ffffff|color|666666|textAlign|marginRight|8px|fontFamily|Verdana|float|left|focus|CC0000|FF0000|000000|callback|index|action|options|jQuery|extend|k|selector|this|if|length|1|error|More|than|one|selected|object|return|self|0|lindex|size|children|div|prename|KMSPrefix_|replace|W|ig|_|data|onload|css|100|overflow|hidden|position|relative|addClass|image_item|hide|init|setLayout|setAnimate|wrapAll|class|image_box|each|a|image|img|attr|src|remove|coverlink|else|url|no|repeat|z|eq|2|display|none|button_list|for|i|li|append|ul|setCSS|gt|opacity|show|visible|visibility|block|cssCode|style|type|text|margin|padding|parseInt|px|absolute|decoration|transparent|indent|outline|expression|hideFocus|objToCss|top|list|_zoom|cursor|pointer|webkit|adjust|default|prepend|call|fadeIn|overDelayTimer|delegate|_this|setChange|setOpacity|mouseover|setTimeout|200|mouseout|clearTimeout|moveTimer|setInterval|hover|clearInterval|fadeOut|removeClass|animated|stop|animate|not|run|obj|excArr|excFlag|isIE|navigator|userAgent|indexOf|MSIE|key|in|inArray|pKey|A|Z|KtoLowerCase|filter|alpha|isArray|word|str|toLowerCase".split("|")));
$(function () {
    var n = {
        btnTjy: $(".btn-tjy"),
        tjyBox: $(".tjy-box"),
        tjyClose: $(".tjy-close, .tjy-link a[name='tjyToTs']"),
        tbStyle: $(".tbStyle"),
        txtJY: $(".txtJY"),
        txtLX: $(".txtLX"),
        error: $(".tjy-link span"),
        btnSubmit: $(".btn-tjySubmit"),
        bgScreen: $(".bg-screen"),
        bgIFrame: $(".bg-iframe"),
        selectTjy: $(".select-tjy"),
        selectTjyTxt: $(".select-tjy-txt"),
        selectTjyList: $(".select-tjy ul"),
        selectTjyItem: $(".select-tjy ul li")
    }, u = function () {
        if (jQuery.browser.version == "6.0") {
            var t = findDimensions().split("-"), i = findDimensions().split("-");
            n.tjyBox.css({
                top: (i[1] - n.tjyBox.height()) / 2 + document.documentElement.scrollTop + "px",
                left: t[0] / 2 + document.documentElement.scrollLeft
            })
        }
    }, i, r, t;
    n.btnTjy.hover(function () {
        $(this).removeClass("btn-tjy-out").addClass("btn-tjy-hover")
    }, function () {
        $(this).removeClass("btn-tjy-hover").addClass("btn-tjy-out")
    });
    n.btnTjy.click(function () {
        var t = jQuery.browser.version == "6.0" ? window.screen.height - 160 : "100%";
        n.bgScreen.css({height: t, opacity: "0.2"}).fadeIn("slow");
        n.bgIFrame.css({height: t, opacity: "0"}).show();
        n.tjyBox.fadeIn("slow");
        jQuery.browser.version == "6.0" && (t = findDimensions().split("-"), n.tjyBox.css("top", (t[1] - n.tjyBox.height()) / 2 + document.documentElement.scrollTop + "px"), $(window).bind("scroll", function () {
            u()
        }));
        n.tjyBox.fadeIn("slow")
    });
    n.bgScreen.click(function () {
        n.tjyBox.fadeOut("slow");
        $(this).fadeOut("slow");
        n.bgIFrame.hide();
        $(window).unbind("scroll")
    });
    $(".tjy-close").hover(function () {
        $(this).removeClass("tjy-close-out").addClass("tjy-close-hover")
    }, function () {
        $(this).removeClass("tjy-close-hover").addClass("tjy-close-out")
    });
    n.tjyClose.click(function () {
        n.tjyBox.fadeOut("slow");
        n.bgScreen.fadeOut("slow");
        n.bgIFrame.hide();
        $(window).unbind("scroll")
    });
    n.tbStyle.attr("flag", "0");
    i = function () {
        n.txtJY.css("color", "#bfbfbf").val(n.txtJY.attr("hint")).attr("flag", "0")
    };
    r = function () {
        n.txtLX.css("color", "#bfbfbf").val(n.txtLX.attr("hint")).attr("flag", "0")
    };
    n.selectTjy.click(function () {
        n.selectTjyList.show()
    });
    n.selectTjyItem.hover(function () {
        $(this).addClass("current")
    }, function () {
        $(this).removeClass("current")
    });
    n.selectTjyItem.live("click", function () {
        n.selectTjyTxt.text($(this).text()).css("color", "#666");
        n.selectTjyList.hide();
        n.selectTjy.removeClass("error-animate").attr("flag", "1")
    });
    t = !1;
    n.selectTjyList.hover(function () {
        t = !0
    }, function () {
        t = !1
    });
    $(document).mousedown(function (i) {
        i = window.e || i;
        var r = i.target || i.srcElement;
        t || r == n.selectTjyList || n.selectTjyList.hide()
    });
    n.tbStyle.click(function () {
        ($(this).val() == "" || $(this).attr("flag") == "0") && ($(this).hasClass("txtJY") && n.txtJY.val("").css("color", "#666").attr("flag", "1").removeClass("error-animate"), $(this).hasClass("txtLX") && n.txtLX.val("").css("color", "#666").attr("flag", "1").removeClass("error-animate"));
        n.error.hide()
    });
    n.tbStyle.blur(function () {
        $(this).hasClass("select-tjy") || $(this).val() == "" && ($(this).hasClass("txtJY") ? (i(), $(this).addClass("error-animate").attr("flag", "0"), n.error.html("<b><\/b>" + n.txtJY.attr("null")).show()) : (r(), $(this).addClass("error-animate").attr("flag", "0"), n.error.html("<b><\/b>" + n.txtLX.attr("null")).show()))
    });
    n.btnSubmit.hover(function () {
        $(this).removeClass("btn-shadow-ccc-out").addClass("btn-shadow-ccc-hover")
    }, function () {
        $(this).removeClass("btn-shadow-ccc-hover").addClass("btn-shadow-ccc-out")
    });
    n.btnSubmit.click(function () {
        if (n.selectTjy.attr("flag") == "0" || n.txtJY.attr("flag") == "0" || n.txtLX.attr("flag") == "0") return n.selectTjy.attr("flag") == "0" ? (n.error.html("<b><\/b>" + n.selectTjy.attr("null")).show(), n.selectTjy.addClass("error-animate")) : n.txtJY.attr("flag") == "0" ? (n.error.html("<b><\/b>" + n.txtJY.attr("null")).show(), n.txtJY.addClass("error-animate")) : (n.error.html("<b><\/b>" + n.txtLX.attr("null")).show(), n.txtLX.addClass("error-animate")), !1;
        n.error.hide();
        n.tbStyle.removeClass("error-animate");
        var t = $(".select-tjy-txt").val(), u = $("#txtAdvice").val(), f = $("#txtContact").val(),
            o = n.selectTjyTxt.text().indexOf("网站体验") > -1 ? "S" : "G";
        var e = document.URL, s = $("#advice_hdnIp").val(), h = window.tkehi;
        $.ajax({
            type: "POST",
            url: "tjsj.aspx?selectType=" + t + "&textarea=" + u + "&contact=" + f + "&erroUrl=" + e + "&OS=" + detectOS() + "&userAgent=" + navigator.userAgent + "&ScreenSize=" + (window.screen.width + "x" + window.screen.height) + "&IP=" + s + "&type=" + o,
            data: "selectType=" + t + "&textarea=" + u + "&contact=" + f + "&erroUrl=" + e + "&OS" + detectOS() + "&userAgent" + navigator.userAgent + "&ScreenSize" + (window.screen.width + "x" + window.screen.height) + "&IP" + $("data-hint").attr("ip"),
            beforeSend: function (t) {
                t.setRequestHeader("tk1hi", h);
                n.btnSubmit.hide()
            },
            complete: function (t) {
                window.resetehi(t);
                n.btnSubmit.show();
                alert("非常感谢您的建议，我们会认真考虑，同时欢迎您提出更多宝贵的建议。");
                n.tjyBox.fadeOut("slow");
                n.bgScreen.fadeOut("slow");
                n.bgIFrame.hide();
                i();
                r()
            }
        })
    })
})